html - 谷歌字体不适用于 css

标签 html css fonts

我有以下 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/

相关文章:

html - 子光标宽度垂直条在 Safari 输入/文本区域中始终可见

jquery - 在 <div> 元素中创建一个洞

javascript - 如果内容太高,底部模态框无法关闭

css计算量

css - 使 div 高度为 100%,内部拉伸(stretch)行不通

css - 字体在 PC 中与框顶部对齐,在 Mac 中与框底部对齐

c# - 将 href 设置为超链接文本

html - 在网页上使用 Windows 95 字体

android - 不必要地传递上下文。它很昂贵吗?

javascript - ¿如何创建文本 slider 动画?