简体   繁体   English

HTML - 字体仅在Chrome中显示正确,但在IE或Firefox中不显示

[英]HTML - Fonts will only display correct in Chrome but not in IE or Firefox

I have created a new page on my company website. 我在公司网站上创建了一个新页面。 It looks awesome but only in Google Chrome. 它看起来很棒,但仅限于谷歌浏览器。

The fonts do not display correctly within Internet explorer nor Firefox. 字体无法在Internet Explorer或Firefox中正确显示。

Here is the link to the page. 这是该页面的链接。 (the actual content is inside an iframe which is http://www.lynch.ie/test/map.html ) (实际内容在iframe中, http://www.lynch.ie/test/map.html

http://www.lynch.ie/test/test.html http://www.lynch.ie/test/test.html

Thanks, 谢谢,

Please help me, im on my knees with this one! 请帮助我,我跪在这一个! Thank you in advance. 先感谢您。

David L. 大卫L.

It seems that you're loading the font files from a different domain. 您似乎正在从其他域加载字体文件。

Firefox and possibly IE do not allow that unless you set a Access-Control-Allow-Origin header, sample (credits to Callum Silcock's blog article ): Firefox和可能的IE不允许这样做,除非你设置一个Access-Control-Allow-Origin标题,示例(来自Callum Silcock的博客文章 ):

AddType font/ttf .ttf
AddType font/eot .eot
AddType font/otf .otf
AddType font/woff .woff

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM