Font Awesome 5 unicode

后端 未结 3 1154
时光说笑
时光说笑 2020-11-27 22:29

Font Awesome 5 star icon has and different is fas , far

3条回答
  •  温柔的废话
    2020-11-27 22:42

    If you are using the JS+SVG version read this: Font Awesome 5 shows empty square when using the JS+SVG version

    The difference between the regular and the solid version is the font-weight. You simply need to adjust this one to swap between both version:

    input.star:checked ~ label.star:before {
      content: '\f005';
      color: #e74c3c;
      transition: all .25s;
      font-family: 'Font Awesome 5 Free';
      font-weight: 900;
    }
    
    label.star:before {
      content: '\f005';
      font-family: 'Font Awesome 5 Free';
      font-weight: 200;
    }
    
    
    
    

    Here is another related question Font Awesome 5 on pseudo elements shows square instead of icon for more details.

提交回复
热议问题