html - 为什么 "\e034"出现在css中却没有创建对勾图标?

标签 html css

我有这个 CSS:

    <style>
         .icons:before {
            content: "\e034";
            color: #00bc9b;
            font-size: 16px;
            margin-top: -1px;
            margin-left: -1px
        }
    </style>
 
    <span class="icons"> </span>

enter image description here

上面的代码应该显示这样的图标,但它没有显示那个图标。

最佳答案

你在使用 FontAwesome 吗???如果是这样,您缺少font-family: FontAwesome,请将其放入您的代码中:

     .icons:before {
        content: "\e034";
        color: #00bc9b;
        font-size: 16px;
        margin-top: -1px;
        margin-left: -1px;
        font-family: FontAwesome;
    }

编辑:确保您在元素下设置了字体

关于html - 为什么 "\e034"出现在css中却没有创建对勾图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39471248/

相关文章:

html - 有没有办法让文本在元素符号列表中换行?

javascript - 使用JavaScript获取HTML表单值并将其保存到JSON键和值对中

php - 如何使用 PHP 将一长行 html 代码替换为不同的代码?

javascript - 为什么在这个井字游戏中输入 X 或 O 时我的 div 会移动

css - 在移动设备上折叠 flexbox 列

CSS 动画 : Fading images into one another and animating the image and moving it's direction

javascript - 使用 CSS 类或 JS 在 Foundation 中切换移动 View

html - 用 100vh 定义的 div 容器的高度太大(看起来它根据窗口大小定位自身)

html - webkitNotifications - SECURITY_ERR : DOM Exception 18 - script, OK - 按钮

html - 如何在另一个div中定位div