小编Gau*_*ckr的帖子

无法理解防弹@ font-face CSS规则

在将此标记为重复之前,请仔细阅读我的疑问.我在网上彻底搜索(特别是stackoverflow)并且无法清除疑虑.这个问题看起来似乎很长,但它包含了其他人也想知道的关键问题.

我试图在防弹@font-face规则方面获得一点点知识,那里的人们让我感到困惑.请建议我这个家伙.所以,这是Font-Spring(http://blog.fontspring.com/2011/02/further-hardening-of-the-bulletproof-syntax/)建议的最新防弹代码以及解决的IE9兼容模式问题:

@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('webfont.woff') format('woff'), /* Modern Browsers */
     url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
     url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
Run Code Online (Sandbox Code Playgroud)

没有IE9兼容模式修复的那个,也是Font-Spring(http://blog.fontspring.com/2011/02/the-new-bulletproof-font-face-syntax/),看起来像这样:

@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?#iefix') format('embedded-opentype'), 
     url('myfont-webfont.woff') format('woff'), 
     url('myfont-webfont.ttf')  format('truetype'),
     url('myfont-webfont.svg#svgFontName') format('svg');
}
Run Code Online (Sandbox Code Playgroud)

目前,我正在阅读彼得·加斯顿的一本书"The Book Of CSS3".它遵循由Font-Spring所述的IE9兼容模式修复的防弹规则.他说?第二个src属性中带有查询字符串的规则负责IE9 Compat.模式修复.但是,font-spring拥有src …

internet-explorer css3 font-face

6
推荐指数
1
解决办法
4236
查看次数

标签 统计

css3 ×1

font-face ×1

internet-explorer ×1