Created
May 22, 2018 14:12
-
-
Save morozVA/3ad97742c19f96fd5760864ace0c1ff5 to your computer and use it in GitHub Desktop.
fractional star rating on css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="star-ratings-sprite"> | |
<span style="width:90%" class="star-ratings-sprite-rating"></span> | |
</div> | |
.star-ratings-sprite { | |
background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2605/star-rating-sprite.png") repeat-x; | |
font-size: 0; | |
height: 21px; | |
line-height: 0; | |
overflow: hidden; | |
text-indent: -999em; | |
width: 110px; | |
margin: 0 auto; | |
} | |
.star-ratings-sprite-rating { | |
background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/2605/star-rating-sprite.png") repeat-x; | |
background-position: 0 100%; | |
float: left; | |
height: 21px; | |
display:block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment