?#iefix 如何解决 IE6-IE8 中网页字体加载的问题? [英] How does ?#iefix solve web fonts loading in IE6-IE8?
问题描述
网络上有很多这样的文章:http://www.fontspring.com/blog/fixing-ie9-font-face-problems 建议将 ?#iefix
添加到 eot url.我很想知道 这将如何解决问题.谢谢.
Lots of articles in the web like this : http://www.fontspring.com/blog/fixing-ie9-font-face-problems suggest to add a ?#iefix
to the eot url. I was curious to know how is this going to solve the problem. Thanks.
推荐答案
IE8 及更早版本的 src 属性解析器存在错误.所以如果你在 SRC 中包含超过 1 种字体格式,IE 将无法加载它并报告 404 错误.
问号解决了这个问题,因为它让 IE 认为字符串的其余部分(其他 src)是一个查询字符串,因此只加载 EOT 文件...
其他浏览器将遵循规范并仅加载所需的字体类型...
您可能想阅读 Paul Irish 的 Bulletproof @font-face 语法 以了解更多关于其他一些原因......
IE8 and the older have a bug in their parsers for the src attribute. So if you include more than 1 font format in the SRC, IE fails to load it and reports a 404 error.
The question mark solves that problem as it fools IE into thinking the rest of the string (other src) is a query string, and therefore loading just the EOT file...
Other browsers will follow the specification and load just their required font type ...
You may wanna read Paul Irish's Bulletproof @font-face syntax to know more about some other of the why's ...
这篇关于?#iefix 如何解决 IE6-IE8 中网页字体加载的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!