[英]@font-face not working in firefox and Internet Explorer
[英]@font-face not working in IE Internet Explorer
我在客户网站上遇到了麻烦。 该网站托管在http://allisonbraun.com/sexified-sisterhood/上 ,也可以通过http://sexifiedsuccesscircle.com重定向进行访问。
我用来集成Pepita脚本字体的@ font-face规则似乎没有被Internet Explorer 11接受,我很困惑。 我在代码中做错了吗?
以前,我遇到过这样的问题:通过重定向访问时,规则在Firefox中也不起作用,因为它不喜欢字体托管在不同域下的事实。 我设法通过添加来解决此问题
# BEGIN REQUIRED FOR WEBFONTS
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>
# END REQUIRED FOR WEBFONTS
htaccess。 它现在可以在firefox中使用,但是在IE中仍然不管用,无论我从哪个URL访问?
非常感谢您的帮助! 也许我只是在愚蠢地将代码集成错了,但是它似乎在其他地方都可以使用。
最好的,Ffion
看来您只在使用字体中的.ttf文件。 尝试使用诸如FONTSQUIRREL之类的字体生成器转换字体,并以该格式导入(Fontsquirrel为您生成CSS,只需修改路径并使用它):
@font-face {
font-family: 'FONTNAME';
src: url('path_to_font.eot');
src: url('path_to_font.eot?#iefix') format('embedded-opentype'),
url('path_to_font.woff2') format('woff2'),
url('path_to_font.woff') format('woff'),
url('path_to_font.ttf') format('truetype'),
url('path_to_font.svg#fontname') format('svg');
font-weight: normal;
font-style: normal;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.