2012-03-07 25 views
0

我正在查看位於Font Awesome的網頁。如果你打開這個頁面,你會看到它呈現所有Font Awesome的字體圖標。我有一個問題讓字體圖標在IE中顯示,但他們在IE瀏覽器顯示這個頁面,所以我試圖破譯它是如何放在一起的。如果我看看site.css和beautify.css,那麼在任何地方都沒有@ font-face指令。然而,site.css引用了font-family說明符中的'FontAwesome'。有人能告訴我'FontAwesome'如何在這個頁面上得到解決嗎?這個字體是如何被這個網頁加載的?

UPDATE

Ergg,我怎麼會錯過呢?對不起...

回答

3

有不少@font-face定義:

@font-face{ 
    font-family:'MuseoSans'; 
    src:url('../font/museosans_300-webfont.eot'); 
    src:url('../font/museosans_300-webfont.eot') format('embedded-opentype'), url('../font/museosans_300-webfont.ttf') format('truetype'); 
    font-weight:normal; 
    font-style:normal 
} 

@font-face{ 
    font-family:'MuseoSans'; 
    src:url('../font/museosans_500-webfont.eot'); 
    src:url('../font/museosans_500-webfont.eot') format('embedded-opentype'), url('../font/museosans_500-webfont.ttf') format('truetype'); 
    font-weight:bold; 
    font-style:normal 
} 

@font-face{ 
    font-family:'MuseoSlab'; 
    src:url('../font/museo_slab_300-webfont.eot'); 
    src:url('../font/museo_slab_300-webfont.eot') format('embedded-opentype'), url('../font/museo_slab_300-webfont.ttf') format('truetype'); 
    font-weight:normal; 
    font-style:normal 
} 

@font-face{ 
    font-family:'MuseoSlab'; 
    src:url('../font/museo_slab_500-webfont.eot'); 
    src:url('../font/museo_slab_500-webfont.eot') format('embedded-opentype'), url('../font/museo_slab_500-webfont.ttf') format('truetype'); 
    font-weight:bold; 
    font-style:normal 
} 

@font-face{ 
    font-family:'FontAwesome'; 
    src:url('../font/fontawesome-webfont.eot'); 
    src:url('../font/fontawesome-webfont.eot?#iefix') format('embedded-opentype'), url('../font/fontawesome-webfont.woff') format('woff'), url('../font/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svgz#FontAwesomeRegular') format('svg'), url('../font/fontawesome-webfont.svg#FontAwesomeRegular') format('svg'); 
    font-weight:normal; 
    font-style:normal 
} 
2

如果我看看site.css和beautify.css,那麼在任何地方都沒有@ font-face指令。

是的,有。

Here!

1

如果你看看site.css(接近尾聲),你會發現@font-face{font-family:'FontAwesome';src:url('../font/fontawesome-webfont.eot')[...]

更多信息如何使跨瀏覽器@font-face工作,看http://sixrevisions.com/css/font-face-guide/