Google字体不适用于Bootstrap
这是我的Google字体链接:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;900&display=swap" rel="stylesheet">
这是我的CSS代码:
h1{
font-family: 'Montserrat', sans-serif;
font-weight: 900;
}
this is my google fonts links:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;900&display=swap" rel="stylesheet">
and this is my css code:
h1{
font-family: 'Montserrat', sans-serif;
font-weight: 900;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将其直接添加到CSS中:
如果它不起作用,则必须查看Bootstrap是否没有覆盖这些值,因此您必须添加
!重要
,例如:You can add it directly in CSS like:
If it doesn't work you have to see if bootstrap is not overwriting those values so you have to add
!important
there like: