2013-02-13 43 views
2

不工作是我的代碼外部字體(@字體面)與Firefox

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

這裏是我的頭文件

<link rel="stylesheet" href="css/fontstylesheet.css" type="text/css" media="screen" /> 
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /> 
+0

您位於css文件夾的字體文件就像你的鏈接提示?還請顯示您用來調用font-face的font-family css。 – 2013-02-13 15:21:55

+0

@BillyMoat我已經回答了這個問題我的自我...我只是發佈它爲每一個嘗試我的解決方案..(這是工作已經) – 2013-02-13 15:23:38

+0

你的解決方案似乎是「我必須確保我的字體CSS最後鏈接」。據我所知,沒有任何理由應該是這種情況,所以沒有更多的上下文並不是特別有用。 – Chowlett 2013-02-13 15:25:31

回答

0

檢查字體文件的路徑。如果你把字體在不同的字體文件夾出方的意思是提到在CSS的字體包路徑,並嘗試它做工精細css文件夾..

@font-face { 
    font-family: 'WebSymbolsRegular'; 
    src: url('../fonts/websymbols-regular-webfont.eot'); 
    src: url('../fonts/websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'), 
     url('../fonts/websymbols-regular-webfont.woff') format('woff'), 
     url('../fonts/websymbols-regular-webfont.ttf') format('truetype'), 
     url('../fonts/websymbols-regular-webfont.otf') format('opentype'), 
     url('../fonts/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
}