iconfont字体图标使用

1.css引入

@font-face
  font-family 'iconfont'
  src url('//at.alicdn.com/t/font_1062116_jdtc88lagk.eot')
  src url('//at.alicdn.com/t/font_1062116_jdtc88lagk.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_1062116_jdtc88lagk.woff2') format('woff2'),
  url('//at.alicdn.com/t/font_1062116_jdtc88lagk.woff') format('woff'),
  url('//at.alicdn.com/t/font_1062116_jdtc88lagk.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_1062116_jdtc88lagk.svg#iconfont') format('svg')
.iconfont
  font-family 'iconfont' !important
  font-size 18px
  font-style normal
  -webkit-font-smoothing antialiased
  -webkit-text-stroke-width 0.2px
  -moz-osx-font-smoothing grayscale
  display flex
  justify-content center
  align-items center

 

2.html插入元素

<span class="iconfont">span>

 

转载于:https://www.cnblogs.com/sunbey/p/10443125.html

你可能感兴趣的:(iconfont字体图标使用)