在我导入W3.css文件之前,Google字体工作得很好。我甚至尝试将google字体链接移到文档的开头。只要我删除指向W3.css文件的链接,它就会开始工作。Google字体工作:
<head>
<link href="https://fonts.googleapis.com/css?family=Concert+One"rel="stylesheet">
</head>
Google字体不工作:
<head>
<link href="https://fonts.googleapis.com/css?family=Concert+One"rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>
发布于 2017-04-16 02:34:27
你只需要在你想要的元素中声明你正在使用的google字体。
body {
font-size: 30px !important
}
.gf {
font-family: "Concert one"
}
<link href="https://fonts.googleapis.com/css?family=Concert+One" rel="stylesheet">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<div class="gf">test</div>
<div class="w3">test 2</div>
https://stackoverflow.com/questions/43429698
复制相似问题