Inter字体图标不显示
Inter font icon no showing
我有 Inter 字体。我从 Google Fonts 得到它。但是不能显示。好像箭头没有看到字体。可以看到了
而不是 Google Inter Font 页面上的相同箭头
css:
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<style>
body{
font-family: 'Inter', sans-serif;
}
</style>
</head>
html:
<div> ↗</div>
<div >Almost before we knew it, we had left the ground. ↗</div>
怎么了?
如果您想使用自定义字体,您应该将这些字体复制到您的项目文件夹中,然后使用 CSS 代码将它们添加到您的文档中
@font-face {
font-family: Inter;
src: url(sansation_light.woff);
}
将此 src 替换为您在项目中复制的字体地址
只需使用此代码:
对我有用
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter" rel="stylesheet">
<style>
body{
font-family: Inter, sans-serif;
}
p {
font-family: verdana;
font-size: 20px;
}
div{
font-family: Inter;
font-weight: 400;
font-style: normal;
font-size:x-large;
}
</style>
</head>
<body>
<div> ↗</div>
<div >Almost before we knew it, we had left the ground. ↗</div>
</body>
</html>
我有 Inter 字体。我从 Google Fonts 得到它。但是不能显示。好像箭头没有看到字体。可以看到了
而不是 Google Inter Font 页面上的相同箭头
css:
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<style>
body{
font-family: 'Inter', sans-serif;
}
</style>
</head>
html:
<div> ↗</div>
<div >Almost before we knew it, we had left the ground. ↗</div>
怎么了?
如果您想使用自定义字体,您应该将这些字体复制到您的项目文件夹中,然后使用 CSS 代码将它们添加到您的文档中
@font-face {
font-family: Inter;
src: url(sansation_light.woff);
}
将此 src 替换为您在项目中复制的字体地址
只需使用此代码: 对我有用
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Inter" rel="stylesheet">
<style>
body{
font-family: Inter, sans-serif;
}
p {
font-family: verdana;
font-size: 20px;
}
div{
font-family: Inter;
font-weight: 400;
font-style: normal;
font-size:x-large;
}
</style>
</head>
<body>
<div> ↗</div>
<div >Almost before we knew it, we had left the ground. ↗</div>
</body>
</html>