firefox @ font-face不起作用 [英] firefox @font-face doesn't work

查看:161
本文介绍了firefox @ font-face不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的博客博客上使用自定义图标字体。如果我理解正确的Firefox需要下载文件来自同一个域。在我的Chrome上工作正常。我也使用类似的工作谷歌网页字体。我用谷歌代码托管图标。

这里: http:// www。 tipsontricks.com/p/test.html
Chorme和其他工作,但不是Firefox的

这里是我使用的代码

  @ font-face {
font-family:'JustVector';
src:url('xyz.eot');
src:url('xyz.eot?#iefix')format('eot'),
url('xyz.woff')format('woff'),
url(' xyz.ttf')格式('truetype'),
url('xyz#webfontkw9J4lGf')format('svg');
font-weight:normal;
font-style:normal;


$ b .iconfont {

font-family:'JustVector';

$ / code $


$ p
$ b <您应该使用以下语法:

  @ font- face {
font-family:'WebFont';
src:url('myfont.eot?#')format('eot'),/ * IE6-8 * /
url('myfont.woff')format('woff'),/ * Firefox 3.6+,IE9,Chrome 6+,Safari 5.1 + * /
url('myfont.ttf')格式('truetype'); / * Safari 3-5,Chrome4 +,Firefox 3.5,Opera 10+ * /
}

这是一个很好的保罗·爱尔兰博客文章



Css3Please 中的语法


I am trying to use custom icon font on my blogger blog. If I understood correctly firefox requires the download file to be from the same domain. It's working fine on my chrome. I am also using google web fonts that work similarly. I am hosting the icons with google code.

Here: http://www.tipsontricks.com/p/test.html Chorme and others working but not firefox

Here's the code i am using

@font-face {
    font-family: 'JustVector';
    src: url('xyz.eot');
    src: url('xyz.eot?#iefix') format('eot'),
         url('xyz.woff') format('woff'),
         url('xyz.ttf') format('truetype'),
         url('xyz#webfontkw9J4lGf') format('svg');
    font-weight: normal;
    font-style: normal;

}

.iconfont{

font-family: 'JustVector';
}

Any help would be appreciated :)

解决方案

You should be using this syntax:

@font-face {
  font-family: 'WebFont';
  src: url('myfont.eot?#') format('eot'),  /* IE6–8 */
       url('myfont.woff') format('woff'),  /* Firefox 3.6+, IE9, Chrome 6+, Safari 5.1+*/
       url('myfont.ttf') format('truetype');  /* Safari 3—5, Chrome4+, Firefox 3.5, Opera 10+ */
}

Here's a nice Paul Irish blog post,

and there's the syntax on Css3Please

这篇关于firefox @ font-face不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆