HTML5和@ font-face与IE

时间:2011-07-19 15:24:59

标签: javascript html5 fonts css3 font-face

我一直试图使用font-squirrel中的套件让@ font-face在过去2小时内渲染。查看this link,您会发现在所有非IE浏览器中,一切都很好,但在IE中它无法完全呈现......

这是我的字体代码:

@font-face {
    font-family: 'CartoGothicStdBook';
    src: url('../cartogothicstd-book-webfont.eot');
    src: url('../cartogothicstd-book-webfont.eot?#iefix') format('embedded-opentype'),
         url('../cartogothicstd-book-webfont.woff') format('woff'),
         url('../cartogothicstd-book-webfont.ttf') format('truetype'),
         url('../cartogothicstd-book-webfont.svg#cartogothicstdbook') format('svg');
    font-weight: normal;
    font-style: normal;
}

我错过了什么?字体在根目录中,以及样式表(虽然我认为它没有区别)。是因为HTML5标签(我使用的是HTML5 shiv)不能使用@ font-face预IE9吗?

希望很快能听到绝地编码员的消息,

1 个答案:

答案 0 :(得分:0)

您是否尝试过使用http://www.modernizr.com/中的polyfill - modernizer2.js而不是html5 shiv。 @ font-face是由Modernizer检测的css功能,请参阅http://www.modernizr.com/docs/#features-css

相关问题