html - Internet Explorer 不会使用@font-face 显示字体图标

标签 html css font-face font-awesome

我无法在 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/

相关文章:

python - 在 BeautifulSoup 中用标签包装文本的小节

html - 在 IE11 的表格单元格的顶部和底部有一个带有填充的边框

javascript - 视频静音/取消静音

html - 字体文件在哪里?

javascript函数(输入日期大于今天的日期)

javascript - 无法在某个高度维度垂直滚动到表单顶部

jquery - 停止对子元素说 anchor 标记的父 div onclick 函数

javascript - JQuery如何追加到同一个地方

css - 使用字体的前卫字体

css - 字体浏览器兼容性问题