在Firefox上使用图标替换字体的跨浏览器没有问题,目前只显示内容文本,而不是图标文本替换。源代码显示从代码Sass + Magento + .htaccess,任何想法或帮助将不胜感激。
网站: http://www.phoebessecret.co.nz
已经完成了.htaccess重写:
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Origin "http://www.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://skin.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://js.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://media.phoebessecret.co.nz"
</IfModule>
</FilesMatch>CSS:
@font-face {
font-family: 'topshops';
src:url('../fonts/topshops.eot');
src:url('../fonts/topshops.eot?#iefix') format('embedded-opentype'),
url('../fonts/topshops.svg#topshops') format('svg'),
url('../fonts/topshops.woff') format('woff'),
url('../fonts/topshops.ttf') format('truetype');
font-weight: normal;
font-style: normal;}
.icon-fonts {
font-family: 'topshops';
font-style: normal;
speak: none;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-weight: 400;
}
.iconsearch {
content: "\61";
}发布于 2013-08-29 09:02:05
尝试将其添加到.htaccess文件中。它应该能解决你的问题。它修好了我的。
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>发布于 2013-03-22 00:43:37
我对icomoon和Firefox也有意见。你试过 syntax了吗?这与红色的输出有点不同,我的运气更好--从那以后就没有FF问题了。
@font-face {
font-family: 'Graublau Web';
src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}发布于 2013-12-06 10:30:55
我也有同样的问题(安装Wordpress ),在Firefox中没有显示图标。Chrome,Safari,IE运行良好。
在站点启动和运行之后,客户端要求我将www包括到url,而不是只包含http://.。因此,我更改了博客附件,但没有更改Wordpress Adress (在Wordpress仪表板中)。突然,所有的图标都不见了。在将www添加到Wordpress地址后,图标就返回了。
https://stackoverflow.com/questions/13666722
复制相似问题