html - icomoon 中只有一个图标不显示
问题描述
我的所有图标都可以,但没有一个图标::before
为我的span
ori
或div
.
这是我的图标不显示:
这是我正确的图标并::before
为i
:
@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;
}
解决方案
推荐阅读
- ruby - Ruby:如何知道是否有任何祖先已覆盖#initialize 以有条件地调用`super`
- flutter - 保存 Flutter 应用程序的完整状态
- cypress - 使用环境变量 (process.env) 覆盖 Cypress.config().baseUrl
- java - 如何在 Java SpringBoot 中拦截/禁用 HTTP Trace 方法
- html - css span 标签高度排序
- php - PHP在html网页上的不同时间显示不同的图像
- c# - 为什么我的获取数据查看的是旧数据库数据而不是更新的数据库数据?
- django-rest-framework - 如何在 drf-yasg 中制作自定义响应示例
- sql-server - SQL Server 紧急模式 - 语法不正确
- docusaurus - 如何删除语言环境下拉图标(英文单词前的图标)