新建font文件夹,把下载好的字体库放到里面。如图:
在需要用到的css文件中写入
@font-face{
font-family: 'zkxw'; //自行命名
src: url('./../../font/站酷小薇LOGO体.otf'); //导入下载好的字体
}
使用
div{
font-family: zkxw;
}
也可以参考https://blog.csdn.net/lilongwei4321/article/details/81364727