记录一下微信小程序引入iconfont 的步骤及操作流程
1,申请iconfont仓库
地址 https://www.iconfont.cn/
注意要点, 微信小程序不能直接引入,只能引入 base64 的 iconfont,我看很多人在推荐一些第三方网站转。然而iconfont本来就支持
2,自己选需要的图标,然后引入。
3,下载iconfont,我看网上有很多在线引入的方法,我还是喜欢直接下下来。
4,把下载下来的文件引入微信小程序代码里面,把 iconfont.css 更名为 iconfont.wxss
5,在 app.wxss 使用
@import "/style/iconfont.wxss"
引入即可
6,使用:
<text class="iconfont icon-wenben"></text>
7,欧克。