将本地字体导入到 CSS 中使用。
@font-face {
font-family: 'MyWebFont';
src: url('myfont.woff2') format('woff2'),
url('myfont.woff') format('woff');
font-weight: normal;
font-style: normal;
text-rendering: optimizeLegibility;
}
参考链接:
https://www.digitalocean.com/community/tutorials/how-to-load-and-use-custom-fonts-with-css