提问者:小点点

如何改变导航器的渲染字体


我使用的是ATOM,我试图在代码中改变字体家族,但有些东西没有改变。

首先我这样做:href=“https://fonts.googleapis.com/css?family=roboto&display=swap”rel=“stylesheet”type=“text/css”


共1个答案

匿名用户

好的,这里有几种导入google字体的方法

1:在HTML中>头

<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">

然后在css中

body{
font-family: 'Roboto', sans-serif;
}

2:

在css文件中

@导入url('https://fonts.googleapis.com/css?family=roboto&display=swap');

然后

然后在css中

body{
font-family: 'Roboto', sans-serif;
}