简体   繁体   中英

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

My font does not appear in IE8 , but it works in 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).

Are there any CSS classes targeting IE8? 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

"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."

From here :

Older version of Internet Explorer supports Embedded OpenType (EOT) files before @font-face was formalized in CSS3.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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