Firefox 不会渲染字体

发布于 2024-09-25 18:33:19 字数 541 浏览 0 评论 0原文

所以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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神也荒唐 2024-10-02 18:33:19

当您链接 css 文件时只需执行 /path/to_the_file 即可解决

Solved when you link the css file just do /path/to_the_file

断念 2024-10-02 18:33:19

对于某些人来说,可能不是你的情况,因为你已经解决了它,如果字体扩展名正确,问题可能出在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文