我有 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/