苏格兰字体在Internet Explorer中不起作用

时间:2012-05-17 11:39:32

标签: css fonts stylesheet font-face

我从互联网上下载了一个ZURCH字体的TTF文件,它在FF和Chrome中运行良好。但是没有在ie中工作。

有人可以告诉我原因,或者如何解决?

1 个答案:

答案 0 :(得分:1)

确保您使用的字体与您使用它们的网站位于同一个域中。

确保您的css看起来像这样,以实现跨浏览器兼容性,尤其是包含#iefix的行:

@font-face{ 
font-family: 'MyWebFont';
src: url('WebFont.eot');
src: url('WebFont.eot?#iefix') format('embedded-opentype'),
url('WebFont.woff') format('woff'),
url('WebFont.ttf') format('truetype'),
url('WebFont.svg#webfont') format('svg');
}

确保WebFonts的网址也正确

src: url('../path_to_fonts/WebFont.ttf');

如果您需要将ttf转换为其他格式,即。 woff,eot和svg,试试FontSquirrel