@ font-face在Firefox中不起作用

时间:2011-08-05 07:01:02

标签: css firefox font-face

  

可能重复:
  css @font-face not working with Firefox, but working with Chrome and IE

我有一点问题,似乎无法弄清楚解决方案是什么。

我正在使用Museo作为webfont。在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');}

enter image description here

2 个答案:

答案 0 :(得分:2)

我不确定@ font-face设置究竟出了什么问题,但我已经使用@ font-face让Museo在FireFox中工作了。我建议使用Font Squirrel's @font-face generator生成CSS声明和不同的字体文件,这会自动为所有主流浏览器设置所有内容。

答案 1 :(得分:1)

如果你无法使它工作且字体不一定完全相同,那么你应该看一下Google font API。只需从list('Ovo'或'论坛'看起来与您的非常相似)中选择一种字体,然后将其导入您的网站

<link rel="stylesheet" 
      type="text/css" 
      href="http://fonts.googleapis.com/css?family=Font+Name">

...然后将其用作CSS中的常规字体:

body {
  font-family: 'Font Name', Verdana;
}

最好的,除此之外它很简单:它甚至适用于IE6。