字体无法在IE,OTF字体中使用 [英] Font-face not working in IE, otf font
本文介绍了字体无法在IE,OTF字体中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道这个问题被问了很多遍,但是尝试了之后却无法正常工作.这是我用来导入自定义字体的简单CSS.另外,我将其与引导程序一起使用.
I know this was asked multiple times, but I couldn't get it to work after trying them. This is the simple CSS I am using to import a custom font. Also, I am using this with bootstrap.
@font-face {
font-family: Montserrat-Black;
src: url(Montserrat-Black.otf);
}
它在IE11本身中不起作用.请帮帮我.谢谢.
It's not working in IE11 itself. Please help me out. Thank you.
推荐答案
Internet Explorer使用eot格式(旧版)或woff. 请参见 MSDN
Internet explorer use eot format (legacy) or woff. See MSDN
无论如何,我使用此代码以获得最大的兼容性:
Anyway i use this code for maximum compatibility:
@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 */
}
这篇关于字体无法在IE,OTF字体中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文