fontsawesome图标不使用链接在HTML文件中工作

发布于 2025-01-31 02:43:05 字数 45 浏览 2 评论 0原文

我已经厌倦了编写代码,但是在网页上没有显示图标,我尝试更改仍然看不见的背景。

I have been tired of writing code but the icon is not shown on the Web page, I have tried changing the background still not seen.

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

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

发布评论

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

评论(1

梦中的蝴蝶 2025-02-07 02:43:05

要添加fontawesome图标,您首先需要在

建立帐户后,只需转到 https://fontawesome.com/kits 为您的项目。制作新套件非常容易。您只需要遵循他们给出的说明即可。

最后,您将能够看到“将工具包的代码添加到项目”之类的东西。从那里复制套件代码并将其粘贴到HTML文件的标头部分中。

这是如何将其链接到HTML文件的示例。 (请注意,这不会显示任何内容,因为这不是一个有效的Fontawesome套件。)

<!DOCTYPE html>
<html>
<head>
    <title>Document</title>
    <script src="https://kit.fontawesome.com/YOUR_OWN_KIT_CODE.js" crossorigin="anonymous"></script>
</head>
<body>
    <i class="fas fa-cloud" style="font-size:48px;color:red;"></i>
</body>
</html>

谢谢,最好的问候!

to add fontawesome icons, you first need to make an account on https://fontawesome.com.

Once you made an account, then simply go to https://fontawesome.com/kits to make a new kit for your project. It is very easy to make a new kit on their. All you need is to just follow the instructions given by them.

Finally you will be able to see something like "Add Your Kit's Code to a Project". Copy kit code from there and paste it in the header part of your HTML file.

Here is an example of how to link it to your HTML file. (Please note that this won't display anything because this is not a valid fontawesome kit.)

<!DOCTYPE html>
<html>
<head>
    <title>Document</title>
    <script src="https://kit.fontawesome.com/YOUR_OWN_KIT_CODE.js" crossorigin="anonymous"></script>
</head>
<body>
    <i class="fas fa-cloud" style="font-size:48px;color:red;"></i>
</body>
</html>

Thanks and best regards!

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