字体不会在不同的浏览器中呈现

时间:2014-07-15 09:56:09

标签: html css fonts

嘿所以我有一点字体麻烦。我有这个字体用于项目,但它只能在chrome中正确显示。当我尝试切换到其他浏览器时,它根本不显示,并显示默认的字体类型。我可以做的任何事情,以确保我的字体将显示在每个浏览器中,这是我的代码片段。

#p1{
        position:relative;
        font-family: "Didot HTF";
        font-size:120%;
        top: 300px;
        text-align:center;
        white-space: nowrap;
    }

<div id="p1">
    Content, storytelling and strategy for the multi-screen, multi-channel age 
</div>

1 个答案:

答案 0 :(得分:1)

如果您在项目中使用非标准字体我建议您使用@ font-face,它需要使用该服务来传输Web字体中的默认字体,Web字体就可以像这样连接

@font-face {
    font-family: 'SegoePrint';
    src: url('../fonts/SegoePrint.eot?') format('eot'),
         url('../fonts/SegoePrint.woff') format('woff'),
         url('../fonts/SegoePrint.ttf')  format('truetype'),
         url('../fonts/SegoePrint.svg#SegoePrint') format('svg');
}
相关问题