我想回到Webdev,因为我想制作一个简单的网页。我从Bootstrap开始,然后围绕它构建我的页面。我希望能够更改标题的字体系列,但无法正常工作。下面的代码。
<link href="https://fonts.googleapis.com/css?family=Chewy" rel="stylesheet" type="text/css">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>BOOST YOUR CONFIDENCE</title>
<section class="sectionone">
<h1 class="display-1">Confidence Boost</h1>
</section>
<section class="sectiontwo">
<h2 class="display-4">
We all need a confidence boost sometimes, click below!
</h2>
</section>
最佳答案
好的,因此如注释中所述,您需要引用自定义样式表。确保它在引导程序之后掉落,以便正确覆盖。
<link href="https://fonts.googleapis.com/css?family=Chewy" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="Vendors/bootstrap-grid.css" rel="stylesheet">
<title>BOOST YOUR CONFIDENCE</title>
并且如上所述,确保样式表中的类以点开头。
关于html - Google字体家族不会改变,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48569107/