1、将字体的包体存入在static文件夹下
2、在app.js中引入
@font-face {
font-family: my-font;
src: url('~@/static/Times New Roman.ttf');
}
3、最后在页面中正常使用就行了
.content {
overflow: hidden;
position: relative;
background: url(../../static/bg.png);
background-size: 100% 100%;
width: 100vw;
height:calc(1080px - 143px);
font-family:Times New Roman;
margin: 0 auto;
}