2013-03-23 68 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