zoukankan      html  css  js  c++  java
  • vue+ydui使用iconfont时图标不显示

    原本我是这样定义图标字体的:(省略woff字体编码)

    @font-face {font-family: YDUI-ICONS;
      src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648');
      src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648#iefix') format('embedded-opentype'),
      url('data:application/x-font-woff;charset=utf-8;base64,...) format('woff'),
      url('../../fonts/iconfont/iconfont.ttf?t=1542201734648') format('truetype'),
      url('../../fonts/iconfont/iconfont.svg?t=1542201734648#iconfont') format('svg');
    }

    然后项目的图标一直是小方框,百思不得其解:

     

    然后把woff格式的字体去掉,就可以了:

    @font-face {font-family: YDUI-ICONS;
      src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648');
      src: url('../../fonts/iconfont/iconfont.eot?t=1542201734648#iefix') format('embedded-opentype'),
      url('../../fonts/iconfont/iconfont.ttf?t=1542201734648') format('truetype'),
      url('../../fonts/iconfont/iconfont.svg?t=1542201734648#iconfont') format('svg');
    }

    效果:

  • 相关阅读:
    SCUT
    模板
    重链剖分
    树的重心
    SCUT
    SCUT
    SCUT
    SCUT
    SCUT
    SCUT
  • 原文地址:https://www.cnblogs.com/mankii/p/10224296.html
Copyright © 2011-2022 走看看