作者:DTor惜涵_237 | 来源:互联网 | 2023-09-25 20:20
我正在使用ATOM,并且尝试在代码中从Google正文的字体中更改字体系列,但是并没有改变。
首先我要这样做:href =“ https://fonts.googleapis.com/css?family=Roboto&display=swap” rel =“ stylesheet” type =“ text / css”
好的,有几种导入Google字体的方法
1:
在html> head
中
然后在CSS中
body{
font-family: 'Roboto',sans-serif;
}
2:
css文件中
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
然后
然后在CSS中
body{
font-family: 'Roboto',sans-serif;
}