CSS fonts not loading in IE9

拜拜、爱过 提交于 2019-12-10 15:51:38

问题


I have a problem with @font-face fonts not loading in IE9. IE8 and below works perfect, as do every other browser I've tried. This is my CSS (font squirrel syntax):

@font-face {
 font-family: 'ssmicon';
 src: url('ssmfont3.eot');
 src: url('ssmfont3.eot?#iefix') format('embedded-opentype'),
  url('ssmfont3.woff') format('woff'),
  url('ssmfont.ttf') format('truetype'),
  url('ssmfont.svg#svgssmfont') format('svg');
 font-weight: normal;
 font-style: normal;
}

All glyphs are in the basic latin range (I read somewhere that IE could have an issue otherwise) and at the same server (so no cross domain issue). I have set Access-Control-Allow-Origin to * just in case. Still no success (at least not according to http://netrenderer.com/. Unfortunately, I don't have access to an IE browser at the moment). Here is a page affected: http://xn--ssongsmat-v2a.nu/ssm/Test3

Any other ideas what specific requirements IE9/10 might have when it comes to web fonts?


回答1:


This was a minification issue after all. Seems like IE9 and IE10 are very picky about line breaks being kept in some places, so font-face declarations have to be kept away from all minification.



来源:https://stackoverflow.com/questions/13274040/css-fonts-not-loading-in-ie9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!