Answer the question
In order to leave comments, you need to log in
List items in different background?
Hello!
There is a list of three items. on hover, the first item should be orange, the second should be green, and the third should be yellow. How to do this with CSS?
Thank you.
The code
<li><a href="#">оранжевый</a></li>
<li><a href="#">зеленый</a></li>
<li><a href="#">желтый</a></li>
Answer the question
In order to leave comments, you need to log in
li:nth-child(1):hover { background: #111; }
li:nth-child(2):hover { background: #222; }
li:nth-child(3):hover { background: #333; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question