@font-face 在 Firefox 中不起作用
我遇到了一些问题,似乎不知道解决方案是什么。
我使用 Museo
作为网络字体。在 Safari
中,一切都像魅力一样工作,但在 Firefox
中却不起作用。 有谁知道为什么吗?
@font-face {font-family: 'MuseoSans-500';
src: url('webfonts/eot/style_159303.eot');
src: url('webfonts/eot/style_159303.eot?#iefix') format('embedded-opentype'),
url('webfonts/woff/style_159303.woff') format('woff'),
url('webfonts/ttf/style_159303.ttf') format('truetype'),
url('webfonts/svg/style_159303.svg#MuseoSans-500') format('svg');}
Possible Duplicate:
css @font-face not working with Firefox, but working with Chrome and IE
I have a little problem and can't seem to figure out what the solution is.
I'm using Museo
as a webfont. In Safari
everything works like a charm, but in Firefox
it doesn't work.
Does anyone have any clue why?
@font-face {font-family: 'MuseoSans-500';
src: url('webfonts/eot/style_159303.eot');
src: url('webfonts/eot/style_159303.eot?#iefix') format('embedded-opentype'),
url('webfonts/woff/style_159303.woff') format('woff'),
url('webfonts/ttf/style_159303.ttf') format('truetype'),
url('webfonts/svg/style_159303.svg#MuseoSans-500') format('svg');}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定你的 @font-face 设置到底出了什么问题,但我已经让 Museo 使用 @font-face 在 FireFox 中工作。我建议使用 Font Squirrel 的 @font-face 生成器 生成 CSS 声明和不同的字体文件自动为所有主要浏览器设置一切。
I'm not sure what exactly is wrong with your @font-face setup, but I've gotten Museo working in FireFox using @font-face. I'd recommend generating the CSS declarations and different font files using Font Squirrel's @font-face generator which automatically sets everything up for all major browsers.
如果您无法使其正常工作,并且字体不必完全相同,也许您应该看看Google 字体 API。只需从列表中选择一种字体(“Ovo”或“Forum”看起来与您的非常相似),然后导入在您的网站中使用
...,然后将其用作 CSS 中的常规字体:
它最好的一点是,它很简单:它甚至可以与 IE6 一起使用。
If you can't get it working and the font doesn't have to be exactly the same, maybe you should have a look at the Google font API. Just choose a font from the list ('Ovo' or 'Forum' look quite similar to yours), import it in your website with
...and then use it as a regular font in your CSS:
The best about it, besides that it's that easy: It even works with IE6.