简体   繁体   English

@ font-face在IE8中不起作用,适用于IE9

[英]@font-face does not work in IE8, works in IE9

My font does not appear in IE8 , but it works in IE9 . 我的字体不会出现在IE8中 ,但它可以在IE9中使用

@font-face {
  font-family: 'Ziggurat-HTF-Black';
  src: url('fonts/ziggurat-htf-black.eot');
  src: url('fonts/ziggurat-htf-black.eot?#iefix') format('embedded-opentype'), url('fonts/ziggurat-htf-black.woff') format('woff'), url('fonts/ziggurat-htf-black.ttf') format('truetype'), url('fonts/ziggurat-htf-black.svg#ziggurat-htf-black') format('svg');
  font-weight: normal;
  font-style: normal;
}

Note: I took this from another posted solution on stack overflow, so seriously it's not a duplicate of another question. 注意:我从堆栈溢出的另一个发布的解决方案中获取了这个,所以认真地说它不是另一个问题的重复。

我不能肯定地说这里有什么问题,但我的建议是使用fontsquirrel来生成必要的跨浏览器兼容的CSS。

The syntax is fine, I would look at server configuration or the font file itself. 语法很好,我会查看服务器配置或字体文件本身。 Did you use a conversion tool? 你使用过转换工具了吗? Try converting the font again. 尝试再次转换字体。

Check to see if you can access the EOT file directly (should be fine if it works in IE9). 检查您是否可以直接访问EOT文件(如果在IE9中工作,应该没问题)。

Are there any CSS classes targeting IE8? 是否有针对IE8的CSS类? Check to see if they are changing the font family. 检查他们是否正在更改字体系列。

I was able to get my Ziggurat-Black to work by following the advice in this answer: https://stackoverflow.com/a/7169311/564879 我可以按照这个答案中的建议让我的Ziggurat-Black工作: https//stackoverflow.com/a/7169311/564879

"The most common reason fonts don't load in IE is because the font name table was coded wrong by the font author. That is definitely the case with Josefin. The Family Name + the Style Name must = The Full Name. Josephine fails this. FYI - fontsquirrel.com automatically corrects these problems in their webfonts." “在IE中没有加载字体的最常见原因是因为字体名称表被字体作者编码错误。对于Josefin来说情况确实如此。姓氏+样式名称必须=全名。约瑟芬失败了.FYI - fontsquirrel.com会自动纠正网页内的这些问题。“

From here : 这里

Older version of Internet Explorer supports Embedded OpenType (EOT) files before @font-face was formalized in CSS3. 旧版本的Internet Explorer支持嵌入式OpenType(EOT)文件,之后在CSS3中正式确定了@font-face

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM