字体真棒图标没有出现在 Angular 5 中 [英] Font awesome icons not showing up in Angular 5

查看:28
本文介绍了字体真棒图标没有出现在 Angular 5 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照说明安装了它.首先我输入了

I installed it according to the instructions. First I've typed

npm install --save font-awesome angular-font-awesome

它正确地安装了所有东西.然后我在 .angular-cli.json 中更改以包含这样的 css:

And it installed everything correctly. Then I changed in .angular-cli.json to contain the css like so:

 "styles": [
    "styles.css",
    "../node_modules/font-awesome/css/font-awesome.min.css"
  ],

当我在 html 中输入以下内容时:<span class="fas fa-chevron-left"></span>

And when I type this in the html: <span class="fas fa-chevron-left"></span>

它根本没有显示任何东西.

It does not show anything at all for it.

我也没有错误,但在来源中我找不到任何与字体真棒相关的内容.

I don't have errors either but in sources I can't find anything related to font awesome.

推荐答案

<i class="fa fa-chevron-left"></i>

使用它会帮助你

这篇关于字体真棒图标没有出现在 Angular 5 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆