美文网首页
webpack打包后 css中font-family的微软雅黑字

webpack打包后 css中font-family的微软雅黑字

作者: 小七是外号 | 来源:发表于2022-04-13 10:21 被阅读0次

源码字体为unicode编码:

font-family: "\51AC\9752\9ED1\4F53\7B80\4F53\4E2D\6587"

打包编译后:

font-family: \\5FAE\8F6F\96C5\9ED1

解决方案:优先写英文字体

font-family: Microsoft YaHei

问题原因:暂未找到(可能是低版本的css-loader的问题,走vue-loader无问题)

最后解决方式:在vue文件中重写字体样式

font-family: 微软雅黑

附:font-family中英文对照

https://www.zhangxinxu.com/study/201703/font-family-chinese-english.html

相关文章

网友评论

      本文标题:webpack打包后 css中font-family的微软雅黑字

      本文链接:https://www.haomeiwen.com/subject/ogoosrtx.html