我使用unicode作为每个猎豹表:https://fontawesome.com/v5/cheatsheet/free/solid
我试着按照这里的答案改变字体的大小,但这并没有帮助:Font awesome 5 on pseudo elements
也许问题是在css中链接的?我不知道在哪里得到其他css版本,如果有新的。
.icon {
font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Regular', 'Font Awesome 5 Brands', 'Arial';
font-size: 18px;
font-weight: 900;
}<link href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" rel="stylesheet" />
<div><span class="icon brand"></span>airbnb</div>
<div><span class="icon"></span>amazon-pay</div>
<div><span class="icon"></span>bacteria</div>
发布于 2022-09-06 15:14:51
首先,您需要使用FontAwesome的链接,要么在index.html(主文件)中使用CDN,要么在style.css中导入css。
cdn:<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css">
导入css文件:@import url("https://use.fontawesome.com/releases/v5.13.0/css/all.css");
eg li::before
selector::before{
content: "\f007";
font-family: "Font Awesome 5 Free";
}https://stackoverflow.com/questions/71095151
复制相似问题