小编Par*_*ity的帖子

为什么 Google Font 预连接到 fonts.googleapis.com

我想将 Quicksand 字体添加到我的网站,因此 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=**Quicksand:wght@500**&display=swap" rel="stylesheet">
Run Code Online (Sandbox Code Playgroud)

第一行代码(即预连接到 fonts.googleapis.com)会给我们带来什么好处?

我的意思是,我明白预连接到 fonts.gstatic.com 的意义,因为字体文件驻留在该域中。

html google-font-api web

6
推荐指数
1
解决办法
6004
查看次数

标签 统计

google-font-api ×1

html ×1

web ×1