我无法在 IE (IE9) 中正确加载字体。在 Chrome 中运行良好。
您可以通过查看此 Fiddle 来了解问题.在 IE9 中显示一个框,而在 Chrome 中显示一个星。
我正在使用找到的 FontAwesome 包 here .我认为问题在于 .css 文件顶部的 @font-face 声明(如下所示)。有人能看出为什么 IE 不呈现这种字体吗?
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome-webfont.eot');
src: url('../font/fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
url('../font/fontawesome-webfont.woff') format('woff'),
url('../font/fontawesome-webfont.ttf') format('truetype'),
url('../font/fontawesome-webfont.svgz#FontAwesomeRegular') format('svg'),
url('../font/fontawesome-webfont.svg#FontAwesomeRegular') format('svg');
font-weight: normal;
font-style: normal;
}
最佳答案
解决了这个问题。我的 IE9 处于兼容模式。当我关闭它时,字体开始出现。
关于html - Internet Explorer 不会使用@font-face 显示字体图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9595888/