151
rated 0 times
[
158]
[
7]
/ answers: 1 / hits: 5953
/ 4 Years ago, mon, september 14, 2020, 12:00:00
I want to do a star rating control but I can't seem to find a way to select all previous siblings on hover. Does such thing even exist or do I have to use javascript?
span {
display:inline-block;
width: 32px;
height: 32px;
background-color:#eee;
}
span:hover {
background-color:red;
}
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
More From » css