Font awesome is not showing icon

后端 未结 30 1278
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 06:03

I am using Font Awesome and do not wish to add CSS with HTTP. I downloaded Font Awesome and included it in my code, yet Font Awesome is showing a bordered square box instead

30条回答
  •  感动是毒
    2020-11-30 06:53

    For those of you using SCSS and the NPM package, here is my solution:

    npm i --save @fortawesome/fontawesome-free

    Then at the top of an SCSS file (ideally an SCSS file imported at the root of your application):

    @import '@fortawesome/fontawesome-free/css/fontawesome.css';
    @import '@fortawesome/fontawesome-free/css/all.css';
    

提交回复
热议问题