2013-03-23 69 views
0

這是我的Web字體樣式CSS Web字體如何利用@的使用字體,面對其不工作

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

} 

和我使用的字體像這樣

.men_tp{ 
     color: #d1d3d5; 
     float: left; 
     font-family:"bebas_neueregular",Arial; 
     font-size:22px; 
     } 

其工作罰款在我的機器,因爲我有這些字體,但該字體不適用於其他主機,即使我把這些字體src放在同一區域,我放置該CSS文件。幫助我的夥計們。

回答

0

試着改變你的CSS線以下幾點:(換行符只被插入,使其更容易在此網頁上閱讀)

.men_tp { 
    color: #d1d3d5; 
    float: left; 
    font-family: bebas_neueregular, Arial; 
    font-size:22px; 
} 

聲明瞭新的字體因爲在@ font-face塊中的名稱是「bebas-neueregular」,所以您需要在您的CSS聲明中使用.men_tp樣式。

+0

哦,還要確保在其他瀏覽器中沒有禁用font-face。我在我的Firefox瀏覽器中禁用了font-face,因爲字體渲染引擎從來沒有被設計爲接收來自網絡的內容,所以我懷疑它是否以安全性着稱。 – Bobulous 2013-03-23 12:17:51

+0

現在太相同的問題拋出。 – 2013-03-23 12:27:19

+0

現在它的工作.. :) – 2013-03-23 12:30:47