Firefox网络字体未加载 [英] Firefox webfonts not loading
问题描述
我只有在Firefox中的网络字体有问题,所有其他浏览器(包括IE)都能正常工作。
I'm having an issue with webfonts only in Firefox, all other browsers (including IE) work perfectly.
我的问题是网络字体不会加载
My issues is that the webfonts won't load at all.
我已经看过这个可能的解决方案,编辑htaccess文件(http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems ),但我没有运气。
I've looked at this possible solution, editing the htaccess file (http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems) but I've had no luck.
我可以说的唯一其他事情是在Firefox的错误控制台中,我收到以下警告:
The only other thing that I can say is in Firefox's error console I get the following warning:
解析src的值时出错。跳过到下一个声明
Error in parsing value for "src". Skipped to the next declaration.
下面是我的 font-face
代码:
@font-face {
font-family:AngelinaRegular;
src:url(../fonts/angelina-webfont.eot);
src:url(../fonts/angelina-webfont.eot?iefix) format(eot), url(../fonts/angelina-webfont.woff) format(woff), url(../fonts/angelina-webfont.ttf) format(truetype), url(../fonts/angelina-webfont.svg#webfontOvuhCGpN) format(svg);
font-weight:normal;
font-style:normal;
}
任何想法?
推荐答案
根据我的经验,Firefox很擅长预期 @ font-face
规则中的引号:
In my experience, Firefox is picky about expecting quotes in @font-face
rules:
@font-face {
font-family: AngelinaRegular;
src: url('../fonts/angelina-webfont.eot');
src: url('../fonts/angelina-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/angelina-webfont.woff') format('woff'),
url('../fonts/angelina-webfont.ttf') format('truetype'),
url('../fonts/angelina-webfont.svg#webfontOvuhCGpN') format('svg');
font-weight: normal;
font-style: normal;
}
这篇关于Firefox网络字体未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!