Bootstrap snippet and html example. Dropdown animation with CSS

Bootstrap 3.1.1 snippet "Dropdown animation with CSS" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: menu,navbar,nav

HTML code

Clean, semantic HTML that powers this Bootstrap 3.1.1 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<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

Scoped CSS that styles the component. Paste it after Bootstrap 3.1.1 to keep the design, spacing, and responsiveness consistent.

.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. menu widget with collapse panels

menu widget with collapse panels

Bootstrap example and template. Floating menu

Floating menu

Bootstrap example and template. Features

Features

Bootstrap example and template. news feed sidebaser with online users

news feed sidebaser with online users

Bootstrap example and template. Timeline with 10 Cool Bootstrap jQuery Snippets

Timeline with 10 Cool Bootstrap jQuery Snippets

Bootstrap example and template. Material design for Bootstrap 3 bootdey

Material design for Bootstrap 3 bootdey

Bootstrap example and template. bs4 my experience timeline

bs4 my experience timeline

Bootstrap example and template. bs5 edit profile account details

bs5 edit profile account details

FAQ

How do I use this snippet?

Include Bootstrap 3.1.1, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 3.1.1.

Bootstrap example and template. Dropdown animation with CSS

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 21.7K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

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