导入fortawesome:与Meteor和React的fontawesome包(Import fortawesome:fontawesome package with Meteor and Reac

编程入门 行业动态 更新时间:2024-10-25 17:29:10
导入fortawesome:与Meteor和React的fontawesome包(Import fortawesome:fontawesome package with Meteor and React)

我使用以下命令安装了大气(来自fontawesome)的氛围:

meteor add fortawesome:fontawesome

我是否必须在我的scss主文件/ js文件中声明/导入它,或者我可以从这里开始。 因为我刚刚离开并开始使用它但没有输出。

<i class="fa fa-camera-retro fa-5x"></i>

我需要导入它吗? 因为我正在使用meteor的反应,进入我的js文件?

I've installed the fortawesome (from fontawesome) of atmosphere by using the following command:

meteor add fortawesome:fontawesome

Do I have to declare/import it inside my scss main file/js files or can I just get going from here. Because I've just gone and started using it but no output.

<i class="fa fa-camera-retro fa-5x"></i>

Do I need to import it; because I'm using react with meteor, into my js files?

最满意答案

这不起作用的原因是你使用的是单词class

您需要将其更改为className因为您正在使用React。

当你使用React进行开发时,我建议你打开JavaScript控制台,因为你会看到那里的错误!

The reason this isn't working is you are using the word class

You need to change it to className because you are using React.

When you are developing with React I recommend you open the JavaScript console as you will see errors like that in there!

更多推荐

meteor,js,fontawesome,using,电脑培训,计算机培训,IT培训"/> <meta name="d

本文发布于:2023-08-04 15:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1417636.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:React   Meteor   fortawesome   package   Import

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!