使用font-face引入字体包
1.声明font-face
<style>
@font-face {
font-family: GraublauWeb;
src: url("../../assets/otf/111.otf");
}
@font-face {
font-family: IndexPhone;
src: url("../../assets/otf/222.otf");
}
</style>
2.在样式中使用
<p class='test'></p>
<style>
.test {
font-family: GraublauWeb;
font-size: 20px;
text-align: center;
}
</style>