为什么某些字体真棒图标不显示 [英] why some of the font-awesome icons does not show

查看:103
本文介绍了为什么某些字体真棒图标不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Angular 5中使用了真棒字体作为UI.由于我使用的是sass,因此在安装font-awesome

I am using font-awesome with Angular 5 for my UI. Since I am using sass, I added the following line in .angular-cli.json after installing font-awesome

"styles": [
        "../node_modules/font-awesome/scss/font-awesome.scss",
        "../node_modules/bootstrap/scss/bootstrap.scss",
        "styles.scss"
      ],

某些图标的工作方式例如

Some of the icons works such as

<i class="fa fa-money blue-text"></i>
<i class="fa fa-code blue-text"></i>

然而,更多的则不是.例如,我想将此条形图图标fas fa-chart-bar一起使用,但是它什么也没显示.像fas fa-camera-retro这样的东西仅显示为一个奇怪的正方形,而不是实际的图标.

However a lot more does not. For example, I wanted to use this bar chart icon with fas fa-chart-bar, but it does not show anything. Things like fas fa-camera-retro only shows as a weird square instead of the actual icon.

为什么某些图标不起作用?有没有办法检查这些css类在我安装的font-awesome软件包中是否存在?

Why some of the icons don't work? Is there way to check if these css classes exist in the font-awesome package I installed?

只需在node_modules\font-awesome\css\font-awesome.css中搜索bar图表,仅存在fa-bar-chart,不存在fa-chart-bar.我安装了最新的字体-很棒(4.7.0).为什么他们的网站上显示fa-chart-bar.刚使其与fa fa-bar-chart一起使用.为什么是fa而不是fas呢?

Just searched bar chart in node_modules\font-awesome\css\font-awesome.css and only fa-bar-chart exists, not fa-chart-bar. I have the latest font-awesome when I had it installed (4.7.0). Why does their website says fa-chart-bar. Just got it to work with fa fa-bar-chart. Why it is fa and not fas is beyond me

推荐答案

只需在以下位置搜索条形图 node_modules \ font-awesome \ css \ font-awesome.css和仅fa-bar-chart 存在,不是fa-chart-bar.我拥有最新的字体,棒极了 已安装(4.7.0).为什么他们的网站上显示fa-chart-bar.得到了 它可以与fa fa-bar-chart一起使用.为什么是fa而不是fas不在我范围内

Just searched bar chart in node_modules\font-awesome\css\font-awesome.css and only fa-bar-chart exists, not fa-chart-bar. I have the latest font-awesome when I had it installed (4.7.0). Why does their website says fa-chart-bar. Just got it to work with fa fa-bar-chart. Why it is fa and not fas is beyond me

随着FA5的发布,这种情况发生了变化,因为现在图标有多种样式:

That was changed with the release of FA5, because now there are multiple styles for the icons:

  • fas:FontAwesome实体
  • far:FontAwesome常规
  • fab:FontAwesome品牌
  • fal:FontAwesome灯光
  • fas: FontAwesome solid
  • far: FontAwesome regular
  • fab: FontAwesome brands
  • fal: FontAwesome light

但是,FontAwesome5 free仅适用于大多数图标.要获得完整的体验,您需要付费 FontAwesome Pro .

However, FontAwesome5 free has solid only for most icons. For the full experience, you'd have to pay for FontAwesome Pro.

选择画廊中的任何图标,以查看在该版本中可使用的样式.注意:FA4-icons 此处.

Select any icon in the gallery, to see wich styles are available for it in which release. NB: FA4-icons here.

这篇关于为什么某些字体真棒图标不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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