我想将 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 的意义,因为字体文件驻留在该域中。