[英]Add a custom font with @font-face don't work at all
I'm trying to add an external font to a website, the site does not respond at all.我正在尝试向网站添加外部字体,该网站根本没有响应。 I'm a beginner and just learning, I work on it all day, thank you for your help.
我是初学者,刚刚学习,我整天都在努力,谢谢你的帮助。
@font-face {
font-family: "Alex";
src: url(fonts/AlexBrush-Regular.ttf) format('truetype'),
url(fonts/AlexBrush-Regular.woff) format('woff'),
url(fonts/AlexBrush-Regular.woff2) format('woff2');
}
body {
text-align: center;
}
h1 {
color: black;
font-family: "Alex";
}
.space p {
font-size: 40px;
font-family: "Alex";
}
Put the archive path inside a string Ex:将存档路径放在字符串 Ex 中:
url("fonts/AlexBrush-Regular.ttf") format("truetype"),
url("fonts/AlexBrush-Regular.woff") format("woff"),
url("fonts/AlexBrush-Regular.woff2") format("woff2");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.