gpt4 book ai didi

css - FontAwesome 图标未显示

转载 作者:行者123 更新时间:2023-12-04 10:24:16 28 4
gpt4 key购买 nike

我在页面上的几个地方使用了 Font Awesome 图标,但是当我想在 CSS 中使用它时,它没有显示。我在这里遇到了很多问题,因为我看到其他人也有同样的问题,但没有一个解决方案对我有用:

我的 Font Awesome 版本是:Font Awesome Free 5.11.2

CSS:

.avatar-upload .avatar-edit input+label::after {
font-family: "Font Awesome 5 Free";
content: '\f574';
font-weight: 900;
color: #757575;
position: absolute;
top: 10px;
left: 0;
right: 0;
text-align: center;
margin: auto;
}

enter image description here

最佳答案

为了在 CSS 中使用 FontAwesome 符号,我需要包含 all.css来自 FontAwesome。

<link rel="stylesheet" href="css/all.css">

( all.css 文件保存在我创建的名为 css 的文件夹中。)

关于css - FontAwesome 图标未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60693057/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com