Sass 为什么我的字体加载不正确?

Sass 为什么我的字体加载不正确?,sass,google-font-api,google-fonts,Sass,Google Font Api,Google Fonts,我正在练习使用SCS,两分钟前,我的代码还在工作,在分割变量和创建文件夹结构之前 但是现在,无论我改变什么,都无法改变字体。它只是载入了泰晤士报新罗马版 <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="ht

我正在练习使用SCS,两分钟前,我的代码还在工作,在分割变量和创建文件夹结构之前

但是现在,无论我改变什么,都无法改变字体。它只是载入了泰晤士报新罗马版

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900" rel="stylesheet">

    <!-- <link rel="stylesheet" href="css/icon-font.css"> -->
    <link rel="stylesheet" href="css/style.css">
    <link rel="shortcut icon" type="image/png" href="img/favicon.png">

    <title>Tours</title>
</head>

<body>
    <header class="header">
        <div class="header__logo-box">
            <img src="img/logo-white.png" alt="Logo" class="header__logo">
        </div>

        <div class="header__text-box">
            <h1 class="heading-primary">
                <span class="heading-primary--main">Outdoors</span>
                <span class="heading-primary--sub">is where life happens.</span>
            </h1>

            <a href="#section-tours" class="btn btn--white btn--animated">Discover our tours</a>
        </div>
    </header>


</body>

    body {
        font-family: "Lato", sans-serif;
        font-weight: 400;
        /*font-size: 16px;*/
        line-height: 1.7;
        color: $color-grey-dark;
        padding: 3rem;
    }

    .heading-primary {
        color: $color-white;
        text-transform: uppercase;

        backface-visibility: hidden;
        margin-bottom: 6rem;
        }

The imports are ok, so it should be working.

旅行
户外
是生命发生的地方。
身体{
字体系列:“Lato”,无衬线;
字体大小:400;
/*字体大小:16px*/
线高:1.7;
颜色:$深灰色;
填充:3rem;
}
.标题小学{
颜色:$白色;
文本转换:大写;
背面可见性:隐藏;
边缘底部:6rem;
}
进口是可以的,所以应该有效。

您的代码在JSFIDLE中运行良好。它将Lato显示为字体。您是否尝试清除缓存?您也可以尝试将链接更改为:


如果在渲染之前下载字体需要很长时间,这将提供一个无限的交换时间来加载字体