@font-face 在 Firefox 3.6.14 中不起作用 - WOFF 或 TTF
Posted
技术标签:
【中文标题】@font-face 在 Firefox 3.6.14 中不起作用 - WOFF 或 TTF【英文标题】:@font-face not working in Firefox 3.6.14 - WOFF or TTF 【发布时间】:2011-07-08 11:17:15 【问题描述】:@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;
有谁能给我解惑?
【问题讨论】:
【参考方案1】:修复:
我正在使用 .htaccess 文件进行 mod 重写,它影响了 @font-face...
解决方法是将其放在 .htaccess 文件中:
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
【讨论】:
你需要这个的原因与字体无关。这是因为您试图提供来自不同来源的内容。 +1 另见***.com/questions/2892691/…【参考方案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 的吗?以上是关于@font-face 在 Firefox 3.6.14 中不起作用 - WOFF 或 TTF的主要内容,如果未能解决你的问题,请参考以下文章
为啥这个@font-face 代码在 Firefox 3.6 中不起作用?
@font-face 在 Firefox 中不起作用 [重复]