• circle-more
    
  • user-facenormal
    
  • social-star
    
  • social-starfill
    
  • user-faceid
    
  • device-monitor2
    
  • device-monitor4
    
  • user-facesmile
    
  • media
    
  • device-server
    
  • device-recorder
    
  • data-bug
    
  • device-route
    
  • device-firewall
    
  • device-signal
    
  • user-faceangry
    
  • device-watch
    
  • file-pdf
    
  • media-stop
    
  • user-eyeoff
    
  • device-pcserver
    
  • device-pc
    
  • device-database
    
  • device-phoneon
    
  • device-snap
    
  • device-phone
    
  • media-pause
    
  • media-play
    
  • data-clock
    
  • data-search
    
  • data-bind
    
  • data-bindoff
    
  • device-monitor
    
  • device-mobile
    
  • file-web
    
  • shop-service
    
  • device-pad
    
  • chart-arc
    
  • map-pinfill
    
  • map
    
  • chart-radar
    
  • chart-scatter
    
  • map-pins
    
  • chart-rose
    
  • chart-bubble
    
  • map-snail
    
  • map-pin
    
  • social-share
    
  • data-undo
    
  • shop-crown
    
  • map-locate
    
  • chart-pulse
    
  • map-pinslim
    
  • chart-ring
    
  • chart-projection
    
  • data-redo
    
  • map-global
    
  • chart-pie
    
  • data-down
    
  • data-up
    
  • data-cloudup
    
  • data-clouddown
    
  • file-folder
    
  • data-edit
    
  • data-pen
    
  • shield-check
    
  • shop-cart
    
  • shop-pay
    
  • shop-money
    
  • shop-alipay
    
  • shop-paypal
    
  • shop-van
    
  • shop-wechatpay
    
  • file-tag
    
  • file-excel
    
  • file-ppt
    
  • file-word
    
  • chart-line
    
  • data-sortdown
    
  • data-sortup
    
  • data-switchv
    
  • data-switchh
    
  • device-network
    
  • users
    
  • device-wifi
    
  • user-key
    
  • math-divide
    
  • circle-minus
    
  • map-navigator
    
  • math-minus
    
  • arrow-begin
    
  • arrow-end
    
  • device-bell
    
  • circle-add
    
  • circle-ask
    
  • math-add
    
  • circle-arrow-up
    
  • arrow-down
    
  • arrow-up
    
  • arrow-double-left
    
  • circle-arrow-down
    
  • arrow-double-right
    
  • circle-arrow-right
    
  • circle-arrow-left
    
  • math-close
    
  • data-cloud
    
  • file-copy
    
  • circle-minus-fill
    
  • file-del
    
  • social-comment
    
  • file-save
    
  • data-date
    
  • file
    
  • data-filter
    
  • social-heartfill
    
  • social-heart
    
  • file-image
    
  • map-layers
    
  • file-link
    
  • data-load
    
  • user-login
    
  • user-logout
    
  • user-mail
    
  • arrow-sizeout
    
  • device-microphone
    
  • arrow-sizein
    
  • data-more
    
  • device-mouse
    
  • device-pin
    
  • file-plugin
    
  • device-power
    
  • device-gear
    
  • shield-warning
    
  • shield
    
  • shop
    
  • circle-success
    
  • social-thumbdown
    
  • social-thumbup
    
  • circle-infor
    
  • circle-warning
    
  • map-zoomin
    
  • 
    map-zoomout
    
  • data-reload
    
  • social-message
    
  • user-eye
    
  • file-app
    
  • user
    
  • chart-bar
    
  • user-lock
    
  • user-scan
    
  • chart-barcode
    
  • device-camera
    
  • file-attachment
    
  • arrow-right
    
  • arrow-left
    
  • data-list
    
  • math-check
    
  • circle-stop
    
  • map-aim
    

Unicode 引用


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

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

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

Unicode 使用步骤如下:

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

@font-face {
  font-family: 'iconfont';
  src: url('iconfont.woff2?t=1729746545725') format('woff2'),
       url('iconfont.woff?t=1729746545725') format('woff'),
       url('iconfont.ttf?t=1729746545725') format('truetype');
}

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

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

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

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

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

  • circle-more
    .icon-circlemore
  • user-facenormal
    .icon-user-facenormal
  • social-star
    .icon-social-star
  • social-starfill
    .icon-social-starfill
  • user-faceid
    .icon-user-faceid
  • device-monitor2
    .icon-device-monitor2
  • device-monitor4
    .icon-device-monitor4
  • user-facesmile
    .icon-user-facesmile
  • media
    .icon-media
  • device-server
    .icon-device-server
  • device-recorder
    .icon-device-recorder
  • data-bug
    .icon-data-bug
  • device-route
    .icon-device-route
  • device-firewall
    .icon-device-firewall
  • device-signal
    .icon-device-signal
  • user-faceangry
    .icon-user-faceangry
  • device-watch
    .icon-device-watch
  • file-pdf
    .icon-file-pdf
  • media-stop
    .icon-media-stop
  • user-eyeoff
    .icon-user-eyeoff
  • device-pcserver
    .icon-device-pcserver
  • device-pc
    .icon-device-pc
  • device-database
    .icon-device-database
  • device-phoneon
    .icon-device-phoneon
  • device-snap
    .icon-device-snap
  • device-phone
    .icon-device-phone
  • media-pause
    .icon-media-pause
  • media-play
    .icon-media-play
  • data-clock
    .icon-data-clock
  • data-search
    .icon-data-search
  • data-bind
    .icon-data-bind
  • data-bindoff
    .icon-data-bindoff
  • device-monitor
    .icon-device-monitor
  • device-mobile
    .icon-device-mobile
  • file-web
    .icon-file-web
  • shop-service
    .icon-shop-service
  • device-pad
    .icon-device-pad
  • chart-arc
    .icon-chart-arc
  • map-pinfill
    .icon-map-pinfill
  • map
    .icon-map1
  • chart-radar
    .icon-chart-radar
  • chart-scatter
    .icon-chart-scatter
  • map-pins
    .icon-map-pins
  • chart-rose
    .icon-chart-rose
  • chart-bubble
    .icon-chart-bubble
  • map-snail
    .icon-map-snail
  • map-pin
    .icon-map-pin2
  • social-share
    .icon-social-share
  • data-undo
    .icon-data-undo
  • shop-crown
    .icon-shop-crown
  • map-locate
    .icon-map-locate
  • chart-pulse
    .icon-chart-pulse
  • map-pinslim
    .icon-map-pinslim
  • chart-ring
    .icon-chart-ring
  • chart-projection
    .icon-chart-projection
  • data-redo
    .icon-data-redo
  • map-global
    .icon-map-global
  • chart-pie
    .icon-chart-pie
  • data-down
    .icon-data-down
  • data-up
    .icon-data-up
  • data-cloudup
    .icon-data-cloudup
  • data-clouddown
    .icon-data-clouddown
  • file-folder
    .icon-file-folder
  • data-edit
    .icon-data-edit
  • data-pen
    .icon-data-pen
  • shield-check
    .icon-shield-check
  • shop-cart
    .icon-shop-cart
  • shop-pay
    .icon-shop-pay
  • shop-money
    .icon-shop-money
  • shop-alipay
    .icon-shop-alipay
  • shop-paypal
    .icon-shop-paypal
  • shop-van
    .icon-shop-van
  • shop-wechatpay
    .icon-shop-wechatpay
  • file-tag
    .icon-file-tag
  • file-excel
    .icon-file-excel
  • file-ppt
    .icon-file-ppt
  • file-word
    .icon-file-word
  • chart-line
    .icon-chart-line
  • data-sortdown
    .icon-data-sortdown
  • data-sortup
    .icon-data-sortup
  • data-switchv
    .icon-data-switchv
  • data-switchh
    .icon-data-switchh
  • device-network
    .icon-device-network
  • users
    .icon-users
  • device-wifi
    .icon-device-wifi
  • user-key
    .icon-user-key
  • math-divide
    .icon-math-divide
  • circle-minus
    .icon-circle-minus
  • map-navigator
    .icon-map-navigator
  • math-minus
    .icon-math-minus
  • arrow-begin
    .icon-arrow-begin
  • arrow-end
    .icon-arrow-end
  • device-bell
    .icon-device-bell
  • circle-add
    .icon-circle-add
  • circle-ask
    .icon-circle-ask
  • math-add
    .icon-math-add
  • circle-arrow-up
    .icon-circle-arrow-up
  • arrow-down
    .icon-arrow-down
  • arrow-up
    .icon-arrow-up
  • arrow-double-left
    .icon-arrow-double-left
  • circle-arrow-down
    .icon-circle-arrow-down
  • arrow-double-right
    .icon-arrow-double-right
  • circle-arrow-right
    .icon-circle-arrow-right
  • circle-arrow-left
    .icon-circle-arrow-left
  • math-close
    .icon-math-close
  • data-cloud
    .icon-data-cloud
  • file-copy
    .icon-file-copy
  • circle-minus-fill
    .icon-circle-minus-fill
  • file-del
    .icon-file-del
  • social-comment
    .icon-social-comment
  • file-save
    .icon-file-save
  • data-date
    .icon-data-date
  • file
    .icon-file
  • data-filter
    .icon-data-filter
  • social-heartfill
    .icon-social-heartfill
  • social-heart
    .icon-social-heart
  • file-image
    .icon-file-image
  • map-layers
    .icon-map-layers
  • file-link
    .icon-file-link
  • data-load
    .icon-data-load
  • user-login
    .icon-user-login
  • user-logout
    .icon-user-logout
  • user-mail
    .icon-user-mail
  • arrow-sizeout
    .icon-arrow-sizeout
  • device-microphone
    .icon-device-microphone
  • arrow-sizein
    .icon-arrow-sizein
  • data-more
    .icon-data-more
  • device-mouse
    .icon-device-mouse
  • device-pin
    .icon-device-pin
  • file-plugin
    .icon-file-plugin
  • device-power
    .icon-device-power
  • device-gear
    .icon-device-gear
  • shield-warning
    .icon-shield-warning
  • shield
    .icon-shield
  • shop
    .icon-shop
  • circle-success
    .icon-circle-success
  • social-thumbdown
    .icon-social-thumbdown
  • social-thumbup
    .icon-social-thumbup
  • circle-infor
    .icon-circle-info
  • circle-warning
    .icon-warning
  • map-zoomin
    .icon-map-zoomin
  • map-zoomout
    .icon-map-zoomout
  • data-reload
    .icon-data-reload
  • social-message
    .icon-social-message
  • user-eye
    .icon-user-eye
  • file-app
    .icon-file-app
  • user
    .icon-user
  • chart-bar
    .icon-chart-bar
  • user-lock
    .icon-user-lock
  • user-scan
    .icon-user-scan
  • chart-barcode
    .icon-chart-barcode
  • device-camera
    .icon-device-camera
  • file-attachment
    .icon-file-attachment
  • arrow-right
    .icon-arrow-right
  • arrow-left
    .icon-arrow-left
  • data-list
    .icon-data-list
  • math-check
    .icon-math-check
  • circle-stop
    .icon-circle-stop
  • map-aim
    .icon-map-aim

font-class 引用


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

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

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

使用步骤如下:

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

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

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

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

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

  • circle-more
    #icon-circlemore
  • user-facenormal
    #icon-user-facenormal
  • social-star
    #icon-social-star
  • social-starfill
    #icon-social-starfill
  • user-faceid
    #icon-user-faceid
  • device-monitor2
    #icon-device-monitor2
  • device-monitor4
    #icon-device-monitor4
  • user-facesmile
    #icon-user-facesmile
  • media
    #icon-media
  • device-server
    #icon-device-server
  • device-recorder
    #icon-device-recorder
  • data-bug
    #icon-data-bug
  • device-route
    #icon-device-route
  • device-firewall
    #icon-device-firewall
  • device-signal
    #icon-device-signal
  • user-faceangry
    #icon-user-faceangry
  • device-watch
    #icon-device-watch
  • file-pdf
    #icon-file-pdf
  • media-stop
    #icon-media-stop
  • user-eyeoff
    #icon-user-eyeoff
  • device-pcserver
    #icon-device-pcserver
  • device-pc
    #icon-device-pc
  • device-database
    #icon-device-database
  • device-phoneon
    #icon-device-phoneon
  • device-snap
    #icon-device-snap
  • device-phone
    #icon-device-phone
  • media-pause
    #icon-media-pause
  • media-play
    #icon-media-play
  • data-clock
    #icon-data-clock
  • data-search
    #icon-data-search
  • data-bind
    #icon-data-bind
  • data-bindoff
    #icon-data-bindoff
  • device-monitor
    #icon-device-monitor
  • device-mobile
    #icon-device-mobile
  • file-web
    #icon-file-web
  • shop-service
    #icon-shop-service
  • device-pad
    #icon-device-pad
  • chart-arc
    #icon-chart-arc
  • map-pinfill
    #icon-map-pinfill
  • map
    #icon-map1
  • chart-radar
    #icon-chart-radar
  • chart-scatter
    #icon-chart-scatter
  • map-pins
    #icon-map-pins
  • chart-rose
    #icon-chart-rose
  • chart-bubble
    #icon-chart-bubble
  • map-snail
    #icon-map-snail
  • map-pin
    #icon-map-pin2
  • social-share
    #icon-social-share
  • data-undo
    #icon-data-undo
  • shop-crown
    #icon-shop-crown
  • map-locate
    #icon-map-locate
  • chart-pulse
    #icon-chart-pulse
  • map-pinslim
    #icon-map-pinslim
  • chart-ring
    #icon-chart-ring
  • chart-projection
    #icon-chart-projection
  • data-redo
    #icon-data-redo
  • map-global
    #icon-map-global
  • chart-pie
    #icon-chart-pie
  • data-down
    #icon-data-down
  • data-up
    #icon-data-up
  • data-cloudup
    #icon-data-cloudup
  • data-clouddown
    #icon-data-clouddown
  • file-folder
    #icon-file-folder
  • data-edit
    #icon-data-edit
  • data-pen
    #icon-data-pen
  • shield-check
    #icon-shield-check
  • shop-cart
    #icon-shop-cart
  • shop-pay
    #icon-shop-pay
  • shop-money
    #icon-shop-money
  • shop-alipay
    #icon-shop-alipay
  • shop-paypal
    #icon-shop-paypal
  • shop-van
    #icon-shop-van
  • shop-wechatpay
    #icon-shop-wechatpay
  • file-tag
    #icon-file-tag
  • file-excel
    #icon-file-excel
  • file-ppt
    #icon-file-ppt
  • file-word
    #icon-file-word
  • chart-line
    #icon-chart-line
  • data-sortdown
    #icon-data-sortdown
  • data-sortup
    #icon-data-sortup
  • data-switchv
    #icon-data-switchv
  • data-switchh
    #icon-data-switchh
  • device-network
    #icon-device-network
  • users
    #icon-users
  • device-wifi
    #icon-device-wifi
  • user-key
    #icon-user-key
  • math-divide
    #icon-math-divide
  • circle-minus
    #icon-circle-minus
  • map-navigator
    #icon-map-navigator
  • math-minus
    #icon-math-minus
  • arrow-begin
    #icon-arrow-begin
  • arrow-end
    #icon-arrow-end
  • device-bell
    #icon-device-bell
  • circle-add
    #icon-circle-add
  • circle-ask
    #icon-circle-ask
  • math-add
    #icon-math-add
  • circle-arrow-up
    #icon-circle-arrow-up
  • arrow-down
    #icon-arrow-down
  • arrow-up
    #icon-arrow-up
  • arrow-double-left
    #icon-arrow-double-left
  • circle-arrow-down
    #icon-circle-arrow-down
  • arrow-double-right
    #icon-arrow-double-right
  • circle-arrow-right
    #icon-circle-arrow-right
  • circle-arrow-left
    #icon-circle-arrow-left
  • math-close
    #icon-math-close
  • data-cloud
    #icon-data-cloud
  • file-copy
    #icon-file-copy
  • circle-minus-fill
    #icon-circle-minus-fill
  • file-del
    #icon-file-del
  • social-comment
    #icon-social-comment
  • file-save
    #icon-file-save
  • data-date
    #icon-data-date
  • file
    #icon-file
  • data-filter
    #icon-data-filter
  • social-heartfill
    #icon-social-heartfill
  • social-heart
    #icon-social-heart
  • file-image
    #icon-file-image
  • map-layers
    #icon-map-layers
  • file-link
    #icon-file-link
  • data-load
    #icon-data-load
  • user-login
    #icon-user-login
  • user-logout
    #icon-user-logout
  • user-mail
    #icon-user-mail
  • arrow-sizeout
    #icon-arrow-sizeout
  • device-microphone
    #icon-device-microphone
  • arrow-sizein
    #icon-arrow-sizein
  • data-more
    #icon-data-more
  • device-mouse
    #icon-device-mouse
  • device-pin
    #icon-device-pin
  • file-plugin
    #icon-file-plugin
  • device-power
    #icon-device-power
  • device-gear
    #icon-device-gear
  • shield-warning
    #icon-shield-warning
  • shield
    #icon-shield
  • shop
    #icon-shop
  • circle-success
    #icon-circle-success
  • social-thumbdown
    #icon-social-thumbdown
  • social-thumbup
    #icon-social-thumbup
  • circle-infor
    #icon-circle-info
  • circle-warning
    #icon-warning
  • map-zoomin
    #icon-map-zoomin
  • map-zoomout
    #icon-map-zoomout
  • data-reload
    #icon-data-reload
  • social-message
    #icon-social-message
  • user-eye
    #icon-user-eye
  • file-app
    #icon-file-app
  • user
    #icon-user
  • chart-bar
    #icon-chart-bar
  • user-lock
    #icon-user-lock
  • user-scan
    #icon-user-scan
  • chart-barcode
    #icon-chart-barcode
  • device-camera
    #icon-device-camera
  • file-attachment
    #icon-file-attachment
  • arrow-right
    #icon-arrow-right
  • arrow-left
    #icon-arrow-left
  • data-list
    #icon-data-list
  • math-check
    #icon-math-check
  • circle-stop
    #icon-circle-stop
  • map-aim
    #icon-map-aim

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>