Font Awesome 图标未显示,但其他图标显示

发布于 2025-01-17 05:14:54 字数 546 浏览 2 评论 0原文

我见过很多人遇到这个问题,但他们都有不同的解决方案,但没有一个对我有用。 我尝试将“fa”更改为“fas”和“fab”,导入了一堆 CDN、文件、all.css、链接,但都不起作用。但它适用于某些图标。 例如,这个有效:

<i class="fas fa-scissors"></i>

但这个无效:

<i class="fas fa-person-fill"></i>

我该如何解决这个问题?

我尝试将“fa”更改为“fas”和“fab”,导入了一堆 CDN、文件、all.css、链接,但都不起作用。但它适用于某些图标。 例如,这个有效:

<i class="fas fa-scissors"></i>

但这个无效:

<i class="fas fa-person-fill"></i>

我该如何解决这个问题?

I've seen a lot of people with this problem, but they all had different solutions but none has worked for me.
I've tried changing "fa" to "fas" and "fab", I've imported a bunch of CDNs, files, all.css, links and none worked. But it works for some icons.
For example, this one works:

<i class="fas fa-scissors"></i>

but this one doesn't:

<i class="fas fa-person-fill"></i>

How can I solve this?

I've tried changing "fa" to "fas" and "fab", I've imported a bunch of CDNs, files, all.css, links and none worked. But it works for some icons.
For example, this one works:

<i class="fas fa-scissors"></i>

but this one doesn't:

<i class="fas fa-person-fill"></i>

How can I solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

愿得七秒忆 2025-01-24 05:14:54

图标名称后面的 fill 是一个 bootstrap 的东西,但您需要将 fafas 更改为 >bi

查看 bootstrapfont-awesome

以下是如何使用 font Awesome 和 bootstrap 图标:

<!--  Font Awesome cdn -->
<link rel="stylesheet" 
 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">


<!--  Bootstrap cdn -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">


 
<h5>font awesome Icon :</h5>
<i class="fa fa-person"></i>

<h5>Bootstrap Icon :</h5>
<i class="bi bi-person-fill"></i>

The fill after the icon name is a bootstrap thing but you need to change the fa or fas to bi

see the available icons for bootstrap and font-awesome

here is how you can use both font awesome and bootstrap icons:

<!--  Font Awesome cdn -->
<link rel="stylesheet" 
 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">


<!--  Bootstrap cdn -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">


 
<h5>font awesome Icon :</h5>
<i class="fa fa-person"></i>

<h5>Bootstrap Icon :</h5>
<i class="bi bi-person-fill"></i>

寄居人 2025-01-24 05:14:54

您不需要将“fill”作为名称的一部分 - “FAS”前缀代表“Font Awesome SOLID” - 因此默认情况下会填充它

<!--  Font Awesome cdn -->
<link rel="stylesheet" 
 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
 
 <p>fas fa-scissors</p>
<i class="fas fa-scissors"></i>

<p>fas fa-person</p>
<i class="fas fa-person"></i>

You do not need the "fill" as part of the name -the "FAS" prefix stands for "Font Awesome SOLID" - so its filled in by default

<!--  Font Awesome cdn -->
<link rel="stylesheet" 
 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
 
 <p>fas fa-scissors</p>
<i class="fas fa-scissors"></i>

<p>fas fa-person</p>
<i class="fas fa-person"></i>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文