Skip to content

Instantly share code, notes, and snippets.

@raulgobr
Created June 26, 2014 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raulgobr/3b5740bd2dfd092c7337 to your computer and use it in GitHub Desktop.
Save raulgobr/3b5740bd2dfd092c7337 to your computer and use it in GitHub Desktop.
<style type="text/css">
.rating {
overflow: hidden;
display: inline-block;
font-size: 0;
position: relative;
}
.rating-input {
float: right;
width: 16px;
height: 16px;
padding: 0;
margin: 0 0 0 -16px;
opacity: 0;
}
.rating:hover .rating-star:hover,
.rating:hover .rating-star:hover ~ .rating-star,
.rating-input:checked ~ .rating-star {
background-position: 0 0;
}
.rating-star,
.rating:hover .rating-star {
position: relative;
float: right;
display: block;
width: 16px;
height: 16px;
background: url('http://kubyshkin.ru/samples/star-rating/star.png') 0 -16px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment