简体   繁体   English

创建我的第一个反应应用程序并且我的 fontawesome 图标没有显示或加载?

[英]creating my first react app and my fontawesome icon is not displaying or loading?

My font awesome icon is not working.我的字体真棒图标不起作用。 It just popup with a square.它只是弹出一个正方形。 I've linked a cdn to on my index.html but still its not working.我已经在我的index.html上链接了一个 CDN,但它仍然无法正常工作。 It s my first react app and I was trying to insert a icon for a github.这是我的第一个反应应用程序,我试图为 github 插入一个图标。 My code is simple boilerplate for react and i have just include icon tag inside a root element.我的代码是简单的反应样板,我只是在根元素中包含图标标记。 I need a best solution for this problem?我需要这个问题的最佳解决方案吗?

在此处输入图像描述

How to use font awesome如何使用字体真棒


1) you have to generate font awesome kit first by login on Creating and use this kit 1)您必须首先通过登录创建font awesome kit并使用此工具包

2) A script tag will be sent to your mail 2)脚本标签将发送到您的邮件

somewhat similar to this有点类似这个

<script src="https://kit.fontawesome.com/12532eg3q2a.js" crossorigin="anonymous"></script>

3) just put it in your main file and then you can use font-awesome-icons only the one which are free! 3) 只需将它放在您的main file中,然后您就可以只使用免费的font-awesome-icons了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM