icoMoon字体不会在Firefox上显示

use*_*833 7 firefox sass font-face

在Firefox上使用图标替换字体的跨浏览器没有一些问题,目前只显示内容文本而不是icomoon文本替换.从代码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>
Run Code Online (Sandbox Code Playgroud)

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";
}
Run Code Online (Sandbox Code Playgroud)

小智 1

我在使用 icomoon 和 Firefox 时也遇到了问题。您尝试过Paul Irish 的“防弹”@font-face语法吗?它与 icomoon 的输出有点不同,而且我的运气更好 - 从那以后就没有 FF 问题。

@font-face {
    font-family: 'Graublau Web';
    src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}
Run Code Online (Sandbox Code Playgroud)