Font Awesome 5 font-family issue

前端 未结 16 2803
深忆病人
深忆病人 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条回答
  •  醉话见心
    2020-12-12 14:57

    Strangely you must put the 'font-weight: 900' in some icons so that it shows them.

    #mainNav .navbar-collapse .navbar-sidenav .nav-link-collapse:after {
      content: '\f107';
      font-family: 'Font Awesome\ 5 Free'; 
      font-weight: 900; /* Fix version 5.0.9 */
    }
    

提交回复
热议问题