css - Magento 多商店 - 字体在 Firefox 和 IE 中不起作用

标签 css internet-explorer magento firefox font-face

我有 Magento Multi 商店。 我已经使用 Font-face 套件加载了字体系列。 Font Face 系列不适用于 Firefox 和 IE。

代码:

@font-face {
    font-family: 'zrnicregular';
    src: url('../fonts/zrnic_rg-webfont.eot');
    src: url('../fonts/zrnic_rg-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/zrnic_rg-webfont.woff') format('woff'),
         url('../fonts/zrnic_rg-webfont.ttf') format('truetype'),
         url('../fonts/zrnic_rg-webfont.svg#zrnicregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

Main Store URL : firststore.com
Secondary store URL : secondstore.com.

这个字体在我的主商店中的所有浏览器中运行良好。 但在 Firefox 和 IE 中,二级存储字体未正确加载 我对两个商店使用相同的主题。

帮助解决此问题。

最佳答案

在您的辅助域上,您的样式表是从第一个域加载的,因此由于跨域策略,字体在 IE 和 Firefox 上被阻止。 将其添加到您的 htaccess 中,以允许您的辅助网站使用第一个网站中的字体:

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

关于css - Magento 多商店 - 字体在 Firefox 和 IE 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18127647/

相关文章:

javascript - 在 Internet Explorer 中对 svg 使用 AppendChild 是错误的

Magento 结帐在 IE9 和 IE8 中被破坏

javascript - 单击链接时不显示表单

javascript - Jquery Scroll to Element 不会为我的滚动设置动画

html - 标志的链接只有部分功能

javascript - Instafeed 工作正常,但导致页面为 "scrollable"

Magento 合并 javascript 省略文件

css - 如何通过CSS使字体更粗?

css - 重复的 Font Awesome 图标出现在 IE9 中

javascript - 为什么去掉类名后 CSS 动画还继续播放?