Firefox 不会渲染字体
所以firefox不想加载我的字体,路径是正确的我也在Firebug中请求,但它不会渲染它。在其他浏览器上它工作完美,这是我的代码:
@font-face {
font-family: 'Gill Sans';
src: url('/fonts/gillsansstd-webfont.eot');
src: local('☺'), url('/fonts/gillsansstd-webfont.woff') format('woff'), url('/fonts/gillsansstd-webfont.ttf') format('truetype'), url('/fonts/gillsansstd-webfont.svg#webfontCBlAmwSC') format('svg');
font-weight: normal;
font-style: normal;
}
我正在使用 wordpress 并将站点地址设置为 www.site.com si 我已经在 www 上读到了。火狐网站不会渲染字体或类似的东西。你知道解决方案吗?
So firefox doesn't want to load my fonts, the path is right I also so the request in Firebug, but it won't render it. On other browser it works perfect, here is my code:
@font-face {
font-family: 'Gill Sans';
src: url('/fonts/gillsansstd-webfont.eot');
src: local('☺'), url('/fonts/gillsansstd-webfont.woff') format('woff'), url('/fonts/gillsansstd-webfont.ttf') format('truetype'), url('/fonts/gillsansstd-webfont.svg#webfontCBlAmwSC') format('svg');
font-weight: normal;
font-style: normal;
}
I'm using wordpress and site address is set to www.site.com si i've read that on www. sites firefox won't render the fonts or something like that.Do you know a solution or something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您链接 css 文件时只需执行 /path/to_the_file 即可解决
Solved when you link the css file just do /path/to_the_file
对于某些人来说,可能不是你的情况,因为你已经解决了它,如果字体扩展名正确,问题可能出在 MIME 类型扩展名上,如果你使用 IIS,请务必告诉他 MIME 类型,否则你将面临一个很好的问题404
For some people, probably not your case because you solved it already, if the font extension is correct the problem could be on the MIME type extension, if you are using IIS be sure to tell him the MIME type or you are gonna face a nice 404