使用字体库,在浏览器正常,但是在Android手机,调不到字体库,如何修改呢?
字体库引用代码
<style>
@import './common/uni.css';
@font-face {
font-family: SourceHanSansCN-Normal;
src: url('~@/static/SourceHanSansCN-Normal.ttf');
}
@font-face {
font-family: SourceHanSansCN-Bold;
src: url('~@/static/SourceHanSansCN-Bold.ttf');
}
@font-face {
font-family: SourceHanSansCN-Medium;
src: url('~@/static/SourceHanSansCN-Medium.ttf');
}
@font-face {
font-family: SourceHanSansCN-Regular;
src: url('~@/static/SourceHanSansCN-Regular.ttf');
}
</style>
使用代码:
.barnum{
font-family: SourceHanSansCN-Bold;
font-size: 55upx;
color: #333333;
letter-spacing: 0;
}
浏览器:
手机: