I am working for rating with HTML/CSS.
You can check the example below.
ul {
display: inline-block;
list-style: none;
cursor: pointer;
}
ul li {
color: gray;
display: inline-block;
padding: 5px;
}
ul li:hover, li:hover ~ li {
background-color: red;
color: white;
}
<ul>
<li>@</li>
<li>@</li>
<li>@</li>
<li>@</li>
<li>@</li>
</ul>
As you see, when I hover the li, I am getting sibling elements are getting red. Instead I wanted descending elements are getting red.
And I don't want my rating is displayed with inverted color - like all red but selections are gray. This is not what I wanted.
Thanks