CSS嵌入式字体在Firefox中不起作用

时间:2015-04-15 13:10:02

标签: html css firefox fonts

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

}

我已经在我的网站上添加了一个字体,但是它并没有出现在firefox中,是否有人知道为什么会这样?

我的CSS在上面,我的字体在我的CSS样式文件夹中。

任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:0)

您可以尝试在Firefox中使用此代码使用特定于浏览器的css,http://browserhacks.com/是浏览器特定CSS黑客的良好来源,或者您可以只搜索特定于浏览器的CSS。

@-moz-document url-prefix() {
          @font-face {
    font-family: 'exoregular';
    src: url('exo-regular-webfont.eot');
    src: url('exo-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('exo-regular-webfont.woff2') format('woff2'),
         url('exo-regular-webfont.woff') format('woff'),
         url('exo-regular-webfont.ttf') format('truetype'),
         url('exo-regular-webfont.svg#exoregular') format('svg');
    font-weight: normal;
    font-style: normal;

}
}

希望这有帮助!

相关问题