CSS @ font-face在IE8中不起作用

hac*_*ckr 27 css font-face

我曾尝试阅读有关如何在IE中处理自定义字体的多篇文章,但它们似乎从来没有对我有用.我尝试将字体转换为EOT,但这似乎也没有用.我不确定我做错了什么,所以我会发布我的代码

@font-face {
  font-family: "Klavika Regular";
    src: url('../fonts/klavika.eot');
    src: local('☺'), url('../fonts/klavika.woff') format('woff'), url('../fonts/klavika.ttf') format('truetype'), url('../fonts/klavika.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)

alb*_*ert 40

这适用于ie8/9

http://dev.bowdenweb.com/a/fonts/serif/alegreya/demo.html

@font-face {
    font-family: 'AftaserifRegular';
    src: url('AftaSerifThin-Regular-webfont.eot');
    src: url('AftaSerifThin-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('AftaSerifThin-Regular-webfont.woff') format('woff'),
         url('AftaSerifThin-Regular-webfont.ttf') format('truetype'),
         url('AftaSerifThin-Regular-webfont.svg#AftaserifRegular') format('svg');
    font-weight: normal;
    font-style: normal;

}
Run Code Online (Sandbox Code Playgroud)

  • 为什么删除了本地('âº')?它是为了什么? (2认同)