【发布时间】:2019-11-23 03:04:15
【问题描述】:
我想设计一个简单的网站,但我一直在努力更改字体。我看了很多教程并阅读了文档,但我不明白我做错了什么!
这是我的html:
<html>
<head>
<title>My website</title>
<link rel='stylesheet' href="style.css">
</head>
<body>
<p class="par">Perchè non si riesce a cambiare font??</p>
</body>
这是 style.css
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
src: url("fonts/Inter-Regular.woff2") format("woff2"),
url("fonts/Inter-Regular.woff") format("woff");
}
.par {
font-size: 100px;
font-family: Inter;
}
我真的不知道如何让它发挥作用。
我目前正在 Windows 10 上的 Firefox 和 Chrome 浏览器(均已更新)上对其进行测试
你们知道我做错了什么吗?
谢谢!
【问题讨论】: