首页 > 解决方案 > icomoon 中只有一个图标不显示

问题描述

我的所有图标都可以,但没有一个图标::before为我的spanoridiv.

这是我的图标不显示:

在此处输入图像描述

这是我正确的图标并::beforei

在此处输入图像描述

    @font-face {
  font-family: 'icomoon';
  src:  url('fonts/icomoon.eot?2b1f8l');
  src:  url('fonts/icomoon.eot?2b1f8l#iefix') format('embedded-opentype'),
    url('fonts/icomoon.ttf?2b1f8l') format('truetype'),
    url('fonts/icomoon.woff?2b1f8l') format('woff'),
    url('fonts/icomoon.svg?2b1f8l#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

[class^="icon-"], [class*=" icon-"] {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'icomoon' !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

标签: htmlcssiconsicomoon

解决方案


推荐阅读