普通版
- 在iconfont项目中添加好icon后,下载至本地
- 将下载中的某些文件上传到自己的网站中
彩色版
- 安装iconfont依赖 npm install -g iconfont-tools
- 在下载的文件目录下执行 iconfont-tools
- 复制此文件到项目中
页面使用
普通iconfont
<text class="iconfont icon-home" />
<view class="iconfont icon-home" style="color: #f00; font-size: 30px;" />
彩色iconfont
<view class="t-icon t-icon-huahuifuwu" style="width: 48px; height: 48px;" />
<text class="t-icon t-icon-banjiacangchu" style="width: 48px; height: 48px;" />