Kri*_*hew 7 css fonts font-face twitter-bootstrap internet-explorer-11
我知道这被多次询问,但是在尝试之后我无法让它工作.这是我用来导入自定义字体的简单CSS.另外,我正在使用它与bootstrap.
@font-face {
font-family: Montserrat-Black;
src: url(Montserrat-Black.otf);
}
Run Code Online (Sandbox Code Playgroud)
它不适用于IE11本身.请帮帮我.谢谢.
Ger*_*ani 17
Internet Explorer使用eot格式(旧版)或woff.请参阅MSDN
Aniway我使用此代码以获得最大兼容性:
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
Run Code Online (Sandbox Code Playgroud)
尝试使用.eot
Internet Explorer的文件格式.就像是:
@font-face {
font-family: Montserrat-Black;
src: url('Montserrat-Black.eot');
src: url('Montserrat-Black.otf');
}
Run Code Online (Sandbox Code Playgroud)