enter image description here

I want that when you hover on a pie, all 3 lines become blue. And my color changes only when I move the cursor to the line (only its color changes). Thank you in advance. Here is my css code:

.navbar-default .navbar-toggle .icon-bar:hover { background-color: blue; } 

html:

 <header> <div class="container"> <nav class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#"><span>Men's Might(здесь можно лого)</span></a> </div> <div class="collapse navbar-collapse" id="collapse"> <ul class="nav navbar-nav navbar-right"> <li><a href="health.html">Health</a></li> <li><a href="#">Power</a></li> <li><a href="#">Attraction</a></li> <li><a href="#">Force</a></li> </ul> </div> </div> </nav> </div> </header> 

It would be desirable that when you hover on the pie all the lines changed color enter image description here

  • Give html-code. - andreymal
  • Posted by html in question - Ravdan
  • Please make your code executable, and I will help you. - Vadim Ovchinnikov
  • I would be grateful if you tell me how to do it. - Ravdan
  • There is a button with which you can do it. - Vadim Ovchinnikov

1 answer 1

 .navbar-default .navbar-toggle:hover .icon-bar{ background-color: blue; } 
  • This code made the background blue, not the line. - Ravdan
  • @Ravdan is not. Look carefully. - Vadizar
  • I tried changing the background to blue when hovering. - Ravdan
  • @Ravdan this selector changes the background of the arrows .navbar-default .navbar-toggle: hover .icon-bar Maybe not completely copied. - Vadizar
  • one
    @Ravdan you are doing something wrong. This code changes the background of exactly three lines - andreymal