我用@fontface添加了一个图标字体。唯一的问题是,它在firefox下不可见。我有最新版本的Firefox。 Safari和Chrome正常运行。

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

最佳答案

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


对于一代字体工具包,您可以使用:


http://www.fontsquirrel.com/fontface/generator
http://fontface.codeandmore.com/index.php

关于css - 图标字体在Firefox中不可见,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14541818/

10-11 01:44