新建font文件夾,把下載好的字體庫放到裏面。如圖:
在需要用到的css文件中寫入
@font-face{
font-family: 'zkxw'; //自行命名
src: url('./../../font/站酷小薇LOGO體.otf'); //導入下載好的字體
}
使用
div{
font-family: zkxw;
}
也可以參考https://blog.csdn.net/lilongwei4321/article/details/81364727