【问题标题】:Epress/Jade Site not allowing google font to be loaded inEmpress/Jade Site 不允许加载谷歌字体
【发布时间】:2017-04-09 05:44:02
【问题描述】:

出于某种原因,我没有做任何事情来让它工作。

Layout.jade 文件

  doctype html
  html
    head
      title= title

      link(rel='stylesheet',   href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css')
      link(rel='styelsheet', href='https://fonts.googleapis.com/css?family=Cinzel:900|Lato:300i', type='text/css')
      link(rel='stylesheet', href='/stylesheets/css/style.css')

    body
      include ./partials/_nav.jade
      block content
      include ./partials/_footer.jade

以及渲染的导航部分:

<span class="nav-item col-md-3 col-sm-3 col-xs-6"><a href="./">Home</a></span>

我有这个 css(简称为一个例子)

.nav-item {
    padding: 5px;
    font-size: 30px;
    text-align: center;
    color: white;
    background-color:#333333;
    font-family: "Lato", serif;
}

我分配的所有其他属性都很好,所以我很困惑为什么字体不起作用。我想也许这与字体加载的确切时间有关?也许它在字体加载之前就被渲染了?

谢谢

【问题讨论】:

  • 尝试去掉, type='text/css'并检查第一个链接, href='https://maxcdn中的空格。

标签: html css node.js fonts pug


【解决方案1】:

错字:styelsheet

link(rel='styelsheet', href='https://fonts.googleapis.com/css?family=Cinzel:900|Lato:300i', type='text/css')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-09-06
    • 1970-01-01
    • 2012-11-23
    • 2013-07-16
    • 2017-01-31
    • 1970-01-01
    • 2013-07-14
    • 1970-01-01
    相关资源
    最近更新 更多