我已经用React.js和webpack建立了一个网站。
我想在网页中使用Google字体,因此将链接放在该部分中。
Google字体
<link href="https://fonts.googleapis.com/css?family=Bungee+Inline" rel="stylesheet">
并设置CSS
body{
font-family: 'Bungee Inline', cursive;
}
但是,它不起作用。
我怎么解决这个问题?
我已经用React.js和webpack建立了一个网站。
我想在网页中使用Google字体,因此将链接放在该部分中。
<link href="https://fonts.googleapis.com/css?family=Bungee+Inline" rel="stylesheet">
body{
font-family: 'Bungee Inline', cursive;
}
但是,它不起作用。
我怎么解决这个问题?
我在css文件中添加了@import和@ font-face,它可以正常工作。