Font awesome is not showing icon

后端 未结 30 1222
爱一瞬间的悲伤
爱一瞬间的悲伤 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:44

    Be aware that the new version (5) of font awesome uses "fas" or "fab" instead of "fa" prefix.

    Quoted from their website:

    The fa prefix has been deprecated in version 5. The new default is the fas solid style and the fab style for brands.

    This is why my fonts were showing blank squares. Now fixed.

    Example code:

    
    

    See: https://fontawesome.com/icons/facebook-f?style=brands

提交回复
热议问题