@font-face {
font-family: "zidingyi";
src: url("woff2字体链接") format("woff2"),
url("woff字体链接") format("woff"),
url("ttf字体链接") format("truetype"),
url("eot字体链接") format("embedded-opentype"),
url("svg字体链接") format("svg"),
url("otf字体链接") format("opentype");
font-weight: normal;
font-style: normal;
font-display: swap;
}
body{
font-family: 'zidingyi'
}
font-family
后的 zidingyi
为自定义字体名称,随便写就可以放在head标签之前即可