我已经使用 Font Squirrel 创建了一个@font-face css 规则和所有字体格式并且在我目前测试过的所有浏览器上都能正常工作,但在 IE7 上不行。字体似乎根本没有加载。
您可以在 http://grupogamma.socialsnack.com/ 查看现场直播
@font-face 规则在 http://grupogamma.socialsnack.com/wp-content/themes/gamma/style.css 上字体在 http://grupogamma.socialsnack.com/fonts/ 上
由 Font Squirrel 生成的我的 css 片段:
@font-face {
font-family: 'UniversCondensedLight';
src: url('/fonts/univers-condensedlight-webfont.eot');
src: url('/fonts/univers-condensedlight-webfont.eot?#iefix') format('eot'),
url('/fonts/univers-condensedlight-webfont.woff') format('woff'),
url('/fonts/univers-condensedlight-webfont.ttf') format('truetype'),
url('/fonts/univers-condensedlight-webfont.svg#webfonteM3WTEhs') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UniversCondensed';
src: url('/fonts/univers-condensed-webfont.eot');
src: url('/fonts/univers-condensed-webfont.eot?#iefix') format('eot'),
url('/fonts/univers-condensed-webfont.woff') format('woff'),
url('/fonts/univers-condensed-webfont.ttf') format('truetype'),
url('/fonts/univers-condensed-webfont.svg#webfontPDfnu2z9') format('svg');
font-weight: normal;
font-style: normal;
}
编辑:
通过使用 Wireshark,我能够验证字体 .eot 确实已加载,并返回 200 OK。内容类型是 application/vnd.ms-fontobject。因此字体已加载,但未使用/未正确呈现。
最佳答案
我的 css 中似乎还有其他东西使 IE7 表现不佳(令人震惊!)
谢天谢地,使用一些神奇的仙尘(缩放:1)解决了这个问题。
关于css - @font-face 被 IE7 忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5576616/