【发布时间】:2020-12-17 11:43:36
【问题描述】:
我在 html 中使用谷歌字体:
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&family=Roboto:wght@300;400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
CSS:
.content-box{
background: #f0f0f0;
min-height: 600px;
display: flex;
flex-direction: column;
width: 100%;
font-family: 'Open Sans', sans-serif;
}
当我刷新时,我首先在 sans-serif 中看到我的文本 0.5 秒(加载时),然后它变成 Open Sans
我该如何解决这个问题?
【问题讨论】:
标签: html css google-fonts