Answer the question
In order to leave comments, you need to log in
How to make a menu whose items darken on hover?
Hello!
I want to make a menu, on pointing at the items of which it changes color, i.e. if we have a white background, then it turns gray on hover?
<div class="sidebar">
<li><a href="/">Главная</a></li>
<li><a href="/odezhda">Спортивная одежда</a></li>
<li><a href="/obuv">Спортивная обувь
</a></li><li><a href="/enter">Вход</a></li>
</div>
Answer the question
In order to leave comments, you need to log in
.sidebar a:hover{
background: #333;
}
Then I think it's not worth telling, and so everything is clear
.sidebar ul li{
color: #000;
transition: all 0.4s ease-in-out;
}
.sidebar ul li:hover {
background: #DDD;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question