你好(抱歉我是法语,英语不好)
问题是使用的字体在 firefox 和 iOS 中都没有显示。
代码如下:
@font-face {
font-family: 'ProximaNova-Regular';
src: url('webfonts/2ACFD6_0_0.eot');
src: url('webfonts/2ACFD6_0_0.eot?#iefix') format('embedded-opentype'),
url('webfonts/2ACFD6_0_0.woff') format('woff'),
url('webfonts/2ACFD6_0_0.ttf') format('truetype'),
url('webfonts/2ACFD6_0_0.svg#wf') format('svg');
}
对于正文元素:
font: normal 1.25em/1.2 ProximaNova-Regular;
我为 iOS 尝试了几种方法:
AddType image/svg-xml svg
AddType image/svg-xml svgz
对于火狐:
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
我还检查了 .svg 文件,字体标签上有 id wf。
谢谢
最佳答案
网络字体也不会出现在 Chrome 或 IE 上。原因很简单,引用的字体资源不存在,即http://www.anthonyblochet.fr/css/webfonts/2ACFD6_0_0.woff这样的网址导致 404 Not Found 响应。
关于ios - 没有出现在 iphone 和 firefox 上的 webfont,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23455713/