字体在firefox中无法正常显示

时间:2014-12-01 08:34:01

标签: html css

我的网站中的Embedded Opensans字体。它在chrome中显示得很好,但在firefox中无法正常显示。在firefox字体显示模糊。

@font-face {
    font-family: 'opensans';
    src: url('../fonts/OpenSans-Regular.eot');
    src: local('OpenSans-Regular'), url('../fonts/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
        url('../fonts/OpenSans-Regular.ttf') format('truetype'),
        url('../fonts/OpenSans-Regular.woff') format('woff'),
        url('../fonts/OpenSans-Regular.otf') format('open-truetype'),
        url('../fonts/OpenSans-Regular.svg#opensans') format('svg');
    font-weight: normal;
    font-style: normal;
}

不仅是opensans字体,我还尝试了两种字体,它也有同样的问题。但其他网站显示正常。请帮我。提前谢谢。

1 个答案:

答案 0 :(得分:0)

我正在使用:

@font-face {
    font-family: OpenSans;
    src: url(../fonts/open-sans/OpenSans-Regular.ttf);
}

@font-face {
    font-family: OpenSansLight;
    src: url(../fonts/open-sans/OpenSans-Light.ttf);
}

@font-face {
    font-family: OpenSansBold;
    src: url(../fonts/open-sans/OpenSans-Bold.ttf);
}

一切正常。如果所有资源都正确加载,您可以查看元素控制台。