简体   繁体   English

IE中的字体

[英]Font-face in IE

I know that these questions are very often asked, but I wanna know what is wrong with my code. 我知道经常问这些问题,但是我想知道我的代码有什么问题。

When I try to load the font, IE wont display the font. 当我尝试加载字体时,IE不会显示该字体。

Here is my code: 这是我的代码:

@font-face {
    font-family: CalistoMTItalic;
    src: url('../fonts/CALISTI.oet'); 
    src: url('../fonts/CALISTI.oet?#iefix') format('embedded-opentype'),
    url('../fonts/CALISTI.TTF') format('truetype');
}

Does anybody know the mistake? 有人知道错误吗?

The mistakes include: 错误包括:

  • mistyping file name extension .eot as .oet 将文件扩展名.eot迷惑为.oet
  • using just EOT and TTF formats 仅使用EOT和TTF格式
  • not contacting Microsoft regarding legal use of their font 未就合法使用其字体与Microsoft联系

The correct extension is eot, not oet. 正确的扩展名是eot,而不是oet。

Also, make sure the path to the font files is relative to the url of the css file. 另外,请确保字体文件的路径相对于css文件的url。

If that doesn't fix your issue then please see related topics on StackOverflow - I see at least 4 with an almost identical title in the "Related" column on the right-hand side of this question. 如果那不能解决您的问题,请参阅StackOverflow上的相关主题-我在该问题右侧的“相关”列中看到至少四个标题几乎相同的标题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM