我的主页有以下链接,我需要为此提出一个关于性能问题的共同请求。
<link href='https://fonts.googleapis.com/css?family=Arvo:400,700' rel='stylesheet' type='text/css' />
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'/>
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900,700italic' rel='stylesheet' type='text/css'/>
最佳答案
再次在 google fonts 上重新选择您需要的所有字体。更新后的 API 将为所有组合的字体创建一个 URL,如下所示:
<link href="https://fonts.googleapis.com/css?family=Arvo:400,400i,700,700i|Lato:100,100i,300,300i,400|Roboto:400,500i,700,700i,900" rel="stylesheet">
您可能会考虑减少所需的字体粗细数量,因为如果您不使用它们,它们会增加不必要的负载。
关于html - 最小化谷歌字体请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40992357/