Font awesome 5 on pseudo elements

前端 未结 8 2036
面向向阳花
面向向阳花 2020-12-07 12:22

In font awesome 4 you could easily apply an icon to a :before/:after element using CSS.

Is the same possible with the new font awesome 5 JS/SVG implementation? As fr

8条回答
  •  一生所求
    2020-12-07 13:11

    You need to enable it (it's disabled by default).

    
    

    Css:

    .class:before{
      display: none;
      content: "\f16c";
      font-family: "Font Awesome 5 Brands";
    }
    

    Other types: Font Awesome 5 + Solid or Regular or Light or Brands

提交回复
热议问题