mahao1993

1、UI设计图有"华文黑体",担心客户端没有该字体,将"huawen.ttf"字体文件,放入项目中:

2、创建一个font.scss(或font.css)文件:

1 @font-face {  
2   font-family: \'huawen\';  //重命名字体名
3   src: url(\'huawen.ttf\');  //引入字体
4   font-weight: normal;  
5   font-style: normal;  
6 }

3、在main.js中引入

import \'@/common/css/font.scss\';

4、就可以直接使用了:

div {
  font-family: \'huawen\';
}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-05-22
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案