Bootstrap snippet and html example. Dropdown animation with CSS

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.
Tags: menu,navbar,nav

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 3.1.1 included, to get the result that you can see in the preview selection

<div class="navbar navbar-default navbar-static-top">
  <div class="container bootstrap snippets bootdey">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Grones</a>
    </div>
    <div class="collapse navbar-collapse">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li class="dropdown "><a href="#" id="drop1" data-toggle="dropdown" class="dropdown-toggle" role="button">Music <b class="caret"></b></a>
            <ul role="menu" class="dropdown-menu" aria-labelledby="drop1">
                <li role="presentation"><a href="#" role="menuitem">Bootdey.com</a></li>
                <li role="presentation"><a href="#" role="menuitem">Option 2</a></li>
                <li role="presentation"><a href="#" role="menuitem">Option 3</a></li>
                <li role="presentation"><a href="#" role="menuitem">New Snippets</a></li>
            </ul>
        </li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</div>

<div class="container bootstrap snippets bootdey">
  
 
</div><!-- /.container -->

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 3.1.1 included, to get the result that you can see in the preview selection

.open > .dropdown-menu {
  -webkit-transform: scale(1, 1);
  transform: scale(1, 1);  
  opacity:1;
}
  
.dropdown-menu {
  opacity:.3;
  -webkit-transform-origin: top;
  transform-origin: top;
  -webkit-animation-fill-mode: forwards;  
  animation-fill-mode: forwards; 
  -webkit-transform: scale(1, 0);
  display: block; 
  transition: all 0.3s linear;
  -webkit-transition: all 0.3s linear;
}

Similar snippets

Bootstrap example and template. Sidebar left menu

Sidebar left menu

Bootstrap example and template. show hide top menu

show hide top menu

Bootstrap example and template. menu widget with collapse panels

menu widget with collapse panels

Bootstrap example and template. bs4 navbar with dropdown animations

bs4 navbar with dropdown animations

Bootstrap example and template. bs4 profile contacts

bs4 profile contacts

Bootstrap example and template. Refresh Widget

Refresh Widget

Bootstrap example and template. bs4 Responsive Dashboard Menu Cards

bs4 Responsive Dashboard Menu Cards

Bootstrap example and template. bs4 my experience timeline

bs4 my experience timeline

Bootstrap example and template. Dropdown animation with CSS

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 20.1K views, Using this bootstrap snippet you have the following benefits:

Bootstrap 3.1.1

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.1.1 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working