伪类元素加字体图标的使用
sonder 中杯

伪类元素加字体图标的使用

  • 先在阿里图标库下载文件到本地

image

  • 找到.ttf文件放到项目中

使用

image

  • 这里需要注意 图标名称是Unicode名称

在page.json中使用字体图标

image

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 "app-plus":{
"titleNView":{
"titleText":"我的收入",
"backgroundColor":"#030313",
"titleColor":"#FFE001",
"buttons":[
{
// 需要在图标名称前加'\u'
"text": "全部门店\ue6b2",
"fontSize":"28rpx",
// 引入字体文件
"fontSrc":"/static/font/iconfont.ttf"
}
]
}
}
  • 本文标题:伪类元素加字体图标的使用
  • 本文作者:sonder
  • 创建时间:2020-05-07 09:17:18
  • 本文链接:https://sonderss.github.io/2020/05/07/伪类元素加字体图标的使用/
 评论