CSS

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

发布于 2021-02-02 16:50:18

我尝试阅读有关如何处理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;
}
关注者
0
被浏览
75
1 个回答
  • 面试哥
    面试哥 2021-02-02
    为面试而生,有面试问题,就找面试哥。

    这在ie8 / 9中有效

    @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;
    
    }
    


知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看