How to change the menu color by hovering the mouse over

1

I've implemented a CSS on my system where I hover over the menu and display the submenus.

This is the CSS to move the mouse over the menus

ul.nav li.dropdown:hover ul.dropdown-menu
{ 
    display: block; 
}

But this is the following, when I move the mouse over these menus I would like the color to change as if it were the click as shown in the photos below:

Clicking the Menu:

Without clicking on the menu:

    
asked by anonymous 08.06.2017 / 20:42

1 answer

2

Just set the background-color property using the ul.nav li.dropdown:hover selector.

ul.nav li.dropdown:hover
{ 
    background-color: algumTomDeAzulAqui;
}

ul.nav li.dropdown:hover ul.dropdown-menu
{ 
    display: block; 
}
    
08.06.2017 / 20:45