如何#ief解决web字体加载在IE6-IE8? [英] How does ?#iefix solve web fonts loading in IE6-IE8?

查看:130
本文介绍了如何#ief解决web字体加载在IE6-IE8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网络中有许多文章,例如: http://www.fontspring.com/ blog / fixing-ie9-font-face-problems 建议在eot网址中添加?#iefix 。我很想知道如何是这将解决这个问题。谢谢。

Lots of articles in the web like this : http://www.fontspring.com/blog/fixing-ie9-font-face-problems suggest to add a ?#iefixto the eot url. I was curious to know how is this going to solve the problem. Thanks.

推荐答案

IE8和老版本的解析器中有一个错误的src属性。因此,如果您在SRC中包含多于1个字体格式,IE将无法加载它并报告404错误。其他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 ...

这篇关于如何#ief解决web字体加载在IE6-IE8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆