想要更改文字的字体

时间:2015-01-12 14:21:54

标签: css text fonts webfonts

我目前有这段代码:

 <div class="box" style="margin-bottom: 10px; max-width: 100%;">     
 <div class="clearfix"style="padding: 10px 10px 0 10px; background: #f3f3f3; text-align: center;">                <span style="font-size: 1.17em; color: #000000;">LINGERIE</span><br/>     
 <p style="color: #000000;">&nbsp;</p>
 <span style="color: #000000;">&diams;Lingerie Sets &nbsp; &nbsp;&diams;Hosiery &nbsp; &nbsp;                    &diams;Plus Size </span><span style="font-size: 12px;">&nbsp; &nbsp;</span></div>
</div>         

我不确定在哪里添加我的字体?我想使用蒙特塞拉特,这是我的菜单的当前字体,等。提前致谢

2 个答案:

答案 0 :(得分:0)

您可以使用CSS执行此操作:

font-family: Montserrat;

例如:

<span style="color: #000000;font-family: Montserrat;">&diams;Lingerie Sets ...</span>

来源:http://www.w3schools.com/cssref/pr_font_font-family.asp

答案 1 :(得分:0)

this link中,您有关于如何使用蒙特塞拉特字体的完整说明:

1)将此代码添加到您的网站(将其添加到您的html页面的<head>部分):

<link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>

2)创建一个新文件,即styles.css,并将其添加到您的<head>部分(或重复使用旧部分)。然后将您的字体集成到CSS中:

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

示例:

h1 { 
    font-family: ‘Metrophobic’, Arial, serif; 
    font-weight: 400; 
}