【问题标题】:@font-face not working in Firefox 3.6.14 - WOFF or TTF@font-face 在 Firefox 3.6.14 中不起作用 - WOFF 或 TTF
【发布时间】:2011-07-08 11:17:15
【问题描述】:

@font-face 在 Firefox 3.6.14 中不起作用 - WOFF 或 TTF

@font-face {
    font-family: "A-B";
    src: url("fonts/AlexandriaFLF-Bold.woff") format("woff"),
         url("fonts/AlexandriaFLF-Bold.ttf") format("truetype"),
         url("fonts/AlexandriaFLF-Bold.svg#webfontm3eq21Q4") format("svg");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'A-BI';
    src: url("fonts/AlexandriaFLF-BoldItalic.woff") format("woff"),
         url("fonts/AlexandriaFLF-BoldItalic.ttf") format("truetype"),
         url("fonts/AlexandriaFLF-Bold.svg#webfontszsn4DPI") format("svg");
    font-weight: normal;
    font-style: normal;
}

有谁能给我解惑?

【问题讨论】:

    标签: css font-face


    【解决方案1】:

    修复:

    我正在使用 .htaccess 文件进行 mod 重写,它影响了 @font-face...

    解决方法是将其放在 .htaccess 文件中:

    <FilesMatch "\.(ttf|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
    </FilesMatch>
    

    【讨论】:

    【解决方案2】:

    我也想插话。由于将该站点引用为 www.domain.com 而不是 domain.com,因此我遇到了类似的问题。

    这是在我的主样式表中作为字体 css 文件的导入

    @import url('http://www.domain.com/font.css'); - not working
    
    
    @import url('http://www.domain.com/font.css'); - working
    

    【讨论】:

    • 呃,你贴的两行代码有什么不同?
    • 你的意思是放一个不带 w3 的吗?
    猜你喜欢
    • 2012-05-14
    • 1970-01-01
    • 2013-01-04
    • 2012-08-19
    • 2012-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-15
    相关资源
    最近更新 更多