2012-08-15 54 views
0

可能重复:
How we can use @font-face in LESS type of CSS字体定义的最小CSS3兼容性规则是什么?

随着我们的脑海里的现代浏览器和其最新版本(一个网站供将来使用)会与TTF这种字体定义, svg并且不是FF,IE,Chrome和Safari的最佳解决方案?

下面是保证兼容性的最佳最小版本吗?换句话说,现在可以svg和eot被删除或者IE仍然需要eot无法读取ttf?

 @font-face { 
      font-family: 'Somefont Regular'; 
      src: url('somefont.eot'); 
      src: local('Somefont Regular'), 
       local('Somefont'), 
       url('somefont.ttf') format('truetype'), 
       url('somefont.svg#font') format('svg'); 

回答

2

神奇的保罗·爱尔兰在2010年It's worth checking out.

同样在@font-face跨浏览器/跨平台的支持,写了一篇文章的某个时候,这里的一些代码,我倾向于经常使用:

@font-face { 
    font-family: 'Museo'; 
    src: url('museo_slab_500-webfont.eot'); 
    src: url('museo_slab_500-webfont.eot?#iefix') format('embedded-opentype'), 
     url('museo_slab_500-webfont.woff') format('woff'), 
     url('museo_slab_500-webfont.ttf') format('truetype'), 
     url('museo_slab_500-webfont.svg#Museo') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
}