• Live Photo
    
  • 放大
    
  • 缩小
    
  • 缩小
    
  • 保障
    
  • 电话
    
  • 订单
    
  • 视频问诊
    
  • 积分
    
  • 奖杯
    
  • 
  • 
  • 声波
    
  • user-voice-line
    
  • user-voice-fill
    
  • github
    
  • github-fill
    
  • 速读
    
  • 速读
    
  • at
    
  • 收纳
    
  • 首页
    
  • 病历
    
  • 记录
    
  • 咨询
    
  • 进行中
    
  • 付款
    
  • 已取消
    
  • 刷新
    
  • 完成
    
  • 特色
    
  • 饮食
    
  • 睡眠
    
  • 设备
    
  • 删除
    
  • link
    
  • openness
    
  • share
    
  • share-fill
    
  • link-break
    
  • 抖音
    
  • 微博
    
  • 新浪微博
    
  • 抖音
    
  • 邮箱
    
  • 邮箱
    
  • 星度主题
    
  • 星度主题
    
  • 搜索
    
  • QQ
    
  • QQ
    
  • 微信
    
  • 微信
    
  • ×
    
  • +
    
  • 评论
    
  • 足迹
    
  • 生活
    
  • 体重
    
  • 设置
    
  • 叶子
    
  • 喜欢
    
  • 定位
    
  • 时间
    
  • 相机
    
  • 标签
    
  • 地址
    
  • 输入
    
  • 消息
    
  • 联系人
    
  • 编辑
    
  • 我的
    
  • 提醒
    
  • 个性化
    
  • 说明
    
  • 图片
    
  • 查看
    
  • 探索
    
  • 探索-选中
    
  • 火车
    
  • 图钉-面性
    
  • 目录
    
  • 编辑
    
  • 评论
    
  • 评论
    
  • 询问
    
  • 
  • 音乐
    
  • 全屏幕
    
  • 日落
    
  • 导航
    
  • 说明
    
  • 归档
    
  • 电影
    
  • 暂停
    
  • 播放
    
  • 复制
    
  • 版权
    
  • 话题
    
  • 曲线
    
  • 
  • 
  • 分类
    
  • 日历
    
  • 热度
    
  • 温度
    
  • 浏览
    
  • 新窗口打开
    
  • 引用
    
  • 文本
    
  • 图片
    
  • 评论
    
  • 开往
    
  • 向左
    
  • 向右
    
  • 向下
    
  • 向上
    
  • 
  • 导航
    
  • 图钉
    
  • 搜索
    
  • 日历
    
  • 筛选
    
  • 404
    
  • 夜间
    

Unicode 引用


Unicode 是字体在网页端最原始的应用方式,特点是:

  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • 默认情况下不支持多色,直接添加多色图标会自动去色。

注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)

Unicode 使用步骤如下:

第一步:拷贝项目下面生成的 @font-face

@font-face {
  font-family: 'thyuu-iconfont';
  src: url('iconfont.woff2?t=1749038317529') format('woff2');
}

第二步:定义使用 iconfont 的样式

.thyuu-iconfont {
  font-family: "thyuu-iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

第三步:挑选相应图标并获取字体编码,应用于页面

<span class="thyuu-iconfont">&#x33;</span>

"thyuu-iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

  • Live Photo
    .thyuu-icon-livephoto
  • 放大
    .thyuu-icon-full-screen
  • 缩小
    .thyuu-icon-exit-screen
  • 缩小
    .thyuu-icon-exit-screen-fill
  • 保障
    .thyuu-icon-safe
  • 电话
    .thyuu-icon-telephone
  • 订单
    .thyuu-icon-indent
  • 视频问诊
    .thyuu-icon-telecamera
  • 积分
    .thyuu-icon-crown
  • 奖杯
    .thyuu-icon-cup
  • .thyuu-icon-female
  • .thyuu-icon-male
  • 声波
    .thyuu-icon-voice-line
  • user-voice-line
    .thyuu-icon-voice
  • user-voice-fill
    .thyuu-icon-voice-fill
  • github
    .thyuu-icon-GitHub
  • github-fill
    .thyuu-icon-GitHub-fill
  • 速读
    .thyuu-icon-fast-read
  • 速读
    .thyuu-icon-fast-read-fill
  • at
    .thyuu-icon-at
  • 收纳
    .thyuu-icon-parcel
  • 首页
    .thyuu-icon-home
  • 病历
    .thyuu-icon-collect
  • 记录
    .thyuu-icon-record
  • 咨询
    .thyuu-icon-phone
  • 进行中
    .thyuu-icon-progress
  • 付款
    .thyuu-icon-money
  • 已取消
    .thyuu-icon-cancel
  • 刷新
    .thyuu-icon-refresh
  • 完成
    .thyuu-icon-done
  • 特色
    .thyuu-icon-rating
  • 饮食
    .thyuu-icon-meals
  • 睡眠
    .thyuu-icon-sleep
  • 设备
    .thyuu-icon-device
  • 删除
    .thyuu-icon-del
  • link
    .thyuu-icon-link
  • openness
    .thyuu-icon-openness
  • share
    .thyuu-icon-share
  • share-fill
    .thyuu-icon-share-fill
  • link-break
    .thyuu-icon-link-break
  • 抖音
    .thyuu-icon-douyin
  • 微博
    .thyuu-icon-weibo
  • 新浪微博
    .thyuu-icon-weibo-fill
  • 抖音
    .thyuu-icon-douyin-fill
  • 邮箱
    .thyuu-icon-mail-fill
  • 邮箱
    .thyuu-icon-mail
  • 星度主题
    .thyuu-icon-theme-logo
  • 星度主题
    .thyuu-icon-theme-logo-fill
  • 搜索
    .thyuu-icon-search-fill
  • QQ
    .thyuu-icon-qq-fill
  • QQ
    .thyuu-icon-qq
  • 微信
    .thyuu-icon-weixin
  • 微信
    .thyuu-icon-weixin-fill
  • ×
    .thyuu-icon-close
  • +
    .thyuu-icon-add
  • 评论
    .thyuu-icon-pinglun-num
  • 足迹
    .thyuu-icon-footmark
  • 生活
    .thyuu-icon-live
  • 体重
    .thyuu-icon-weight
  • 设置
    .thyuu-icon-setting
  • 叶子
    .thyuu-icon-energy
  • 喜欢
    .thyuu-icon-hearts
  • 定位
    .thyuu-icon-locate
  • 时间
    .thyuu-icon-time
  • 相机
    .thyuu-icon-camera
  • 标签
    .thyuu-icon-tag
  • 地址
    .thyuu-icon-location
  • 输入
    .thyuu-icon-write
  • 消息
    .thyuu-icon-mes
  • 联系人
    .thyuu-icon-friend
  • 编辑
    .thyuu-icon-edit
  • 我的
    .thyuu-icon-geren
  • 提醒
    .thyuu-icon-notice
  • 个性化
    .thyuu-icon-think
  • 说明
    .thyuu-icon-info
  • 图片
    .thyuu-icon-photo
  • 查看
    .thyuu-icon-look
  • 探索
    .thyuu-icon-random
  • 探索-选中
    .thyuu-icon-random-fill
  • 火车
    .thyuu-icon-subway-fill
  • 图钉-面性
    .thyuu-icon-tuding-fill
  • 目录
    .thyuu-icon-mulu
  • 编辑
    .thyuu-icon-edit-fill
  • 评论
    .thyuu-icon-pinglun
  • 评论
    .thyuu-icon-pinglun-fill
  • 询问
    .thyuu-icon-says
  • .thyuu-icon-hear
  • 音乐
    .thyuu-icon-music
  • 全屏幕
    .thyuu-icon-full-screen-fill
  • 日落
    .thyuu-icon-night-fill
  • 导航
    .thyuu-icon-nav-fill
  • 说明
    .thyuu-icon-shuoming
  • 归档
    .thyuu-icon-archive
  • 电影
    .thyuu-icon-film
  • 暂停
    .thyuu-icon-pause
  • 播放
    .thyuu-icon-play
  • 复制
    .thyuu-icon-copy
  • 版权
    .thyuu-icon-copyright
  • 话题
    .thyuu-icon-huati
  • 曲线
    .thyuu-icon-curve
  • .thyuu-icon-cloud
  • .thyuu-icon-like
  • 分类
    .thyuu-icon-menu
  • 日历
    .thyuu-icon-calendar
  • 热度
    .thyuu-icon-heats
  • 温度
    .thyuu-icon-weather
  • 浏览
    .thyuu-icon-views
  • 新窗口打开
    .thyuu-icon-new-window
  • 引用
    .thyuu-icon-quote
  • 文本
    .thyuu-icon-text
  • 图片
    .thyuu-icon-image
  • 评论
    .thyuu-icon-pinglun-title
  • 开往
    .thyuu-icon-subway
  • 向左
    .thyuu-icon-left
  • 向右
    .thyuu-icon-right
  • 向下
    .thyuu-icon-bottom
  • 向上
    .thyuu-icon-top
  • .thyuu-icon-kong
  • 导航
    .thyuu-icon-nav
  • 图钉
    .thyuu-icon-tuding
  • 搜索
    .thyuu-icon-search
  • 日历
    .thyuu-icon-rili
  • 筛选
    .thyuu-icon-filter
  • 404
    .thyuu-icon-404
  • 夜间
    .thyuu-icon-night

font-class 引用


font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

与 Unicode 使用方式相比,具有如下特点:

  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。

使用步骤如下:

第一步:引入项目下面生成的 fontclass 代码:

<link rel="stylesheet" href="./iconfont.css">

第二步:挑选相应图标并获取类名,应用于页面:

<span class="thyuu-iconfont thyuu-icon-xxx"></span>

" thyuu-iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

  • Live Photo
    #thyuu-icon-livephoto
  • 放大
    #thyuu-icon-full-screen
  • 缩小
    #thyuu-icon-exit-screen
  • 缩小
    #thyuu-icon-exit-screen-fill
  • 保障
    #thyuu-icon-safe
  • 电话
    #thyuu-icon-telephone
  • 订单
    #thyuu-icon-indent
  • 视频问诊
    #thyuu-icon-telecamera
  • 积分
    #thyuu-icon-crown
  • 奖杯
    #thyuu-icon-cup
  • #thyuu-icon-female
  • #thyuu-icon-male
  • 声波
    #thyuu-icon-voice-line
  • user-voice-line
    #thyuu-icon-voice
  • user-voice-fill
    #thyuu-icon-voice-fill
  • github
    #thyuu-icon-GitHub
  • github-fill
    #thyuu-icon-GitHub-fill
  • 速读
    #thyuu-icon-fast-read
  • 速读
    #thyuu-icon-fast-read-fill
  • at
    #thyuu-icon-at
  • 收纳
    #thyuu-icon-parcel
  • 首页
    #thyuu-icon-home
  • 病历
    #thyuu-icon-collect
  • 记录
    #thyuu-icon-record
  • 咨询
    #thyuu-icon-phone
  • 进行中
    #thyuu-icon-progress
  • 付款
    #thyuu-icon-money
  • 已取消
    #thyuu-icon-cancel
  • 刷新
    #thyuu-icon-refresh
  • 完成
    #thyuu-icon-done
  • 特色
    #thyuu-icon-rating
  • 饮食
    #thyuu-icon-meals
  • 睡眠
    #thyuu-icon-sleep
  • 设备
    #thyuu-icon-device
  • 删除
    #thyuu-icon-del
  • link
    #thyuu-icon-link
  • openness
    #thyuu-icon-openness
  • share
    #thyuu-icon-share
  • share-fill
    #thyuu-icon-share-fill
  • link-break
    #thyuu-icon-link-break
  • 抖音
    #thyuu-icon-douyin
  • 微博
    #thyuu-icon-weibo
  • 新浪微博
    #thyuu-icon-weibo-fill
  • 抖音
    #thyuu-icon-douyin-fill
  • 邮箱
    #thyuu-icon-mail-fill
  • 邮箱
    #thyuu-icon-mail
  • 星度主题
    #thyuu-icon-theme-logo
  • 星度主题
    #thyuu-icon-theme-logo-fill
  • 搜索
    #thyuu-icon-search-fill
  • QQ
    #thyuu-icon-qq-fill
  • QQ
    #thyuu-icon-qq
  • 微信
    #thyuu-icon-weixin
  • 微信
    #thyuu-icon-weixin-fill
  • ×
    #thyuu-icon-close
  • +
    #thyuu-icon-add
  • 评论
    #thyuu-icon-pinglun-num
  • 足迹
    #thyuu-icon-footmark
  • 生活
    #thyuu-icon-live
  • 体重
    #thyuu-icon-weight
  • 设置
    #thyuu-icon-setting
  • 叶子
    #thyuu-icon-energy
  • 喜欢
    #thyuu-icon-hearts
  • 定位
    #thyuu-icon-locate
  • 时间
    #thyuu-icon-time
  • 相机
    #thyuu-icon-camera
  • 标签
    #thyuu-icon-tag
  • 地址
    #thyuu-icon-location
  • 输入
    #thyuu-icon-write
  • 消息
    #thyuu-icon-mes
  • 联系人
    #thyuu-icon-friend
  • 编辑
    #thyuu-icon-edit
  • 我的
    #thyuu-icon-geren
  • 提醒
    #thyuu-icon-notice
  • 个性化
    #thyuu-icon-think
  • 说明
    #thyuu-icon-info
  • 图片
    #thyuu-icon-photo
  • 查看
    #thyuu-icon-look
  • 探索
    #thyuu-icon-random
  • 探索-选中
    #thyuu-icon-random-fill
  • 火车
    #thyuu-icon-subway-fill
  • 图钉-面性
    #thyuu-icon-tuding-fill
  • 目录
    #thyuu-icon-mulu
  • 编辑
    #thyuu-icon-edit-fill
  • 评论
    #thyuu-icon-pinglun
  • 评论
    #thyuu-icon-pinglun-fill
  • 询问
    #thyuu-icon-says
  • #thyuu-icon-hear
  • 音乐
    #thyuu-icon-music
  • 全屏幕
    #thyuu-icon-full-screen-fill
  • 日落
    #thyuu-icon-night-fill
  • 导航
    #thyuu-icon-nav-fill
  • 说明
    #thyuu-icon-shuoming
  • 归档
    #thyuu-icon-archive
  • 电影
    #thyuu-icon-film
  • 暂停
    #thyuu-icon-pause
  • 播放
    #thyuu-icon-play
  • 复制
    #thyuu-icon-copy
  • 版权
    #thyuu-icon-copyright
  • 话题
    #thyuu-icon-huati
  • 曲线
    #thyuu-icon-curve
  • #thyuu-icon-cloud
  • #thyuu-icon-like
  • 分类
    #thyuu-icon-menu
  • 日历
    #thyuu-icon-calendar
  • 热度
    #thyuu-icon-heats
  • 温度
    #thyuu-icon-weather
  • 浏览
    #thyuu-icon-views
  • 新窗口打开
    #thyuu-icon-new-window
  • 引用
    #thyuu-icon-quote
  • 文本
    #thyuu-icon-text
  • 图片
    #thyuu-icon-image
  • 评论
    #thyuu-icon-pinglun-title
  • 开往
    #thyuu-icon-subway
  • 向左
    #thyuu-icon-left
  • 向右
    #thyuu-icon-right
  • 向下
    #thyuu-icon-bottom
  • 向上
    #thyuu-icon-top
  • #thyuu-icon-kong
  • 导航
    #thyuu-icon-nav
  • 图钉
    #thyuu-icon-tuding
  • 搜索
    #thyuu-icon-search
  • 日历
    #thyuu-icon-rili
  • 筛选
    #thyuu-icon-filter
  • 404
    #thyuu-icon-404
  • 夜间
    #thyuu-icon-night

Symbol 引用


这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

  • 支持多色图标了,不再受单色限制。
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • 浏览器渲染 SVG 的性能一般,还不如 png。

使用步骤如下:

第一步:引入项目下面生成的 symbol 代码:

<script src="./iconfont.js"></script>

第二步:加入通用 CSS 代码(引入一次就行):

<style>
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>

第三步:挑选相应图标并获取类名,应用于页面:

<svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-xxx"></use>
</svg>