我有以下 html:
<div class="row">
<div class="col-md-4 col-md-offset-1">
<h2 class="uppercase claim claim-light slash headline-standard">Our Playbook</h2>
<div class="paragraph">
Blah blah blah blah
</div>
</div>
<div class="col-md-4 col-md-offset-1">
<h2 class="uppercase claim claim-light slash headline-standard">The Special Sauce
</h2>
<p class="paragraph">
blah blah blah
</p>
</div>
</div>
我想在类段落上使用谷歌字体,所以我有这个 css:
@import url(http://fonts.googleapis.com/css?family=Pacifico);
.paragraph{
font-family: 'Pacifico', cursive;
text-shadow:1px 1px 0 rgba(48,48,48,1);
color:#FFFFFF;
letter-spacing:1pt;
word-spacing:2pt;
font-size:1.3em;
text-align:left;
font-family:arial, helvetica, sans-serif;line-height:1;
}
任何其他 css 属性都可以正常工作,但字体系列却不行,知道为什么会这样吗?
我什至试着把它包括在内:
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
最佳答案
删除 font-family:arial, helvetica, sans-serif;
它覆盖了您指定的第一个字体系列。
关于html - 谷歌字体不适用于 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23440670/