Font Awesome 5 font-family issue

前端 未结 16 2799
深忆病人
深忆病人 2020-12-12 14:31

I integrated Font Awesome 5 in a project with bootstrap 4. When I recall a font via CSS it does not work. with Font Awesome 4 the code was as follows:

#mainN         


        
16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 14:46

    IF it's still not working for you, I had forgotten to add the fa-ul class onto the parent (UL) element:

    Together with the 2 bits of advice provided already by others:

    a) font-family: 'Font Awesome\ 5 Free';
    b) font-weight: 900;
    

    solved it for me.

    FWIW, the include in my tags is just:

    
    

    And I am using this with React and Preact. No need for any special React npm installs or components.

提交回复
热议问题