css - 字体在 chrome 中工作,但在 firefox 和 ie 中不工作

标签 css internet-explorer firefox font-face

我认为标题已经说明了我的问题所在。

这是我的代码,希望你能指出我做错了什么:

@font-face {
  font-family: 'Deer';
  src: url('fonts/Deer.eot') format('embedded-opentype');
  src: url('fonts/Deer.woff') format('woff'),
       url('fonts/Deer.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

IE 正在下载 ttf 和 woff 文件但没有下载 eot,而 firefox 没有下载它们...

最佳答案

试试

@font-face {
  font-family: 'Deer';
  font-weight: normal;
  font-style: normal;
  src: url('fonts/Deer.woff') format('woff'),
       url('fonts/Deer.eot') format('eot'),
       url('fonts/Deer.ttf') format('ttf');
}

我认为@font-face 中不允许超过 1 个 src 参数。

关于css - 字体在 chrome 中工作,但在 firefox 和 ie 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27963836/

相关文章:

vb.net - 在 VB.NET 中使用 Firefox HTML 源查看器?

html - 当我最小化我的网页时,一切都搞砸了

html - 背景图像在 ie11 中不可见

javascript - 它不会悬停或让我点击我图库中的图片

html - 替代背景大小 :cover in IE7+

javascript - 为 ie10 重定向站点

javascript - 在 Microsoft Surface 设备上与 Firefox 交互和触摸?

firefox - Webdriver 停止升级 Firefox

html - 如何将图像的一部分插入文本框?

html - 将背景颜色限制为标题宽度