1.创建样式文件 font.css
//引入
@font-face {
font-family: "DINAlternate-Bold"; //字体名称
src: url("DINAlternate-Bold.ttf"); //文件路径
font-weight: normal;
font-style: normal;
}
2.将样式文件font.css引入main.js
import './style/font.css'
3.全局使用
//使用
div {
font-family: "DINAlternate-Bold";
}