2012-08-15 39 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; 
}