How to create rating system using only css
. I don't want to use javascript/jquery
or anything else. I don't want to use image/image sprites
also. I need it only in hover(mouse over) not in click and in pure css. here is the sample image I want.
html code...
<div class="rate">
<div class="rate-item">☆</div>
<div class="rate-item">☆</div>
<div class="rate-item">☆</div>
</div>
css code...
.rate{
color:black;
cursor:pointer;
}
.rate:hover{
color:red;
}
.rate-item{
float:left;
cursor:pointer;
margin:0px 15px 0px 15px;
}
.rate-item:hover ~ .rate-item {
color: black;
}
You can follow this example
http://jsfiddle.net/tanvir0604/JqKjL/1/
You can use fontawsome for better performance or just change the background image property besides the color property of my code.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments