Change the color of stars and display half the star rating with AngularUI Star Rating

I am using Angular's UI rating, but I would like to accomplish the following 2 elements. Any help is much appreciated!

  • I would like to change the color of the selected star ("stateOn: glyphicon-star") to yellow. Is there any way to do this?
  • I would also like to show a half star. For example, I want to display 3 1/2 stars. Could you tell me how to do this?

Here is the rating rating for star rating in AngularUI:

<rating value="rate" max="max" readonly="isReadonly" on-hover="hoveringOver(value)" on-leave="overStar = null" </rating>
+4
source share
2 answers

, , CSS ( - , , , , , ). , CSS,

.glyphicon-star, .glyphicon-star-empty {
  color:yellow;
}
+4
.glyphicon-star : before, .glyphicon-star-empty: before{
  color:yellow;
}

0

Source: https://habr.com/ru/post/1534697/


All Articles