2016-02-04 30 views
1

我试过在我的网站中使用Museo字体。但我不知道如何在网站中使用它。如何使用Museo字体?

如果任何谷歌的字体像“的Roboto”,然后我可以在下面的代码中使用的:

font-family: 'Roboto', sans-serif; 

现在如何使用博物馆的字体?

我可以只使用'Museo Slap'或需要使用'Museo Slap',sans-serif;

+0

你有字体套件吗? – devpro

+0

从网上获取它。那不是问题。我只想知道我可以只使用'Museo Slap'还是需要使用'Museo Slap',sans-serif;这是我的问题 – Guru

+0

是的,你可以,如果你的项目中有字体套件 – devpro

回答

1

,如果你愿意,你可以省略sans-serif,但我会建议保持它,因为它提供后备支持,如果“博物馆掴”不可用。

对于它的价值,我认为Museo Slap实际上被称为Museo Slab

0

无论这个过程可以用在一个PHP文件中使用的文本,而不必把它放在CSS

<style type="text/css"> 
@font-face { 
    font-family: "My Custom Font"; 
    src: url(http://www.example.org/mycustomfont.ttf) format("truetype"); 
} 
p.customfont { 
    font-family: "My Custom Font", Verdana, Tahoma; 
} 
</style> 
<p class="customfont">Hello world!</p> 

这仅仅是字体的TFF或WOFF格式有效。将src替换为服务器上字体的网址。将“我的自定义字体”和“自定义字体”替换为所需字体的名称。

或者你可以添加的字体的代码到style.css中:

.font-face { 
     font-family: "My Custom Font"; 
     src: url(http://www.example.org/mycustomfont.ttf) format("truetype"); 
    }