CSS for star ratings via FontAwesome

后端 未结 6 2056
野趣味
野趣味 2020-12-02 01:46

I\'ve tried a few variations of CSS star ratings via different methods, and am trying to implement the following via FontAwesome rather than using a sprite. I want to be abl

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 02:47

    For future reference, FontAwesome have added half stars to their arsenal. Make sure to include in the section of your page, and then the following will give you the basic structure.

        
    

    If you want the stars to appear bigger, edit fa fa-star to be fa fa-star 3x where 3x indicates the size, so 3x, 4x, 5x etc. If you would like a different style of star, use fa-star-o. The default colour is black, so if you would like to change the colour you can either edit it via CSS or add the colour to the class, i.e class="fa-star-o bg-light"

提交回复
热议问题