navbar hover code example

Example 1: bootstrap navbar a hover color

.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
    background-color: #FFFF00;
    color: #FFC0CB;
}

Example 2: dropdown on hover

.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0; // remove the gap so it doesn't close
 }

Example 3: bootstrap hover dropdown

...
<div class="collapse navbar-collapse" data-hover="dropdown" data-animations="fadeInDown fadeInRight fadeInUp fadeInLeft>
    <ul class="nav navbar-nav">
    ...
    </ul>
</div>
...
or
...
<div class="collapse navbar-collapse">
    <ul class="nav navbar-nav" data-hover="dropdown" data-animations="fadeInDown fadeInRight fadeInUp fadeInLeft>
    ...
    </ul>
</div>
...

Tags:

Css Example