"Toggle navbar with Slide Down Animation"
Bootstrap 3.3.0 Snippet by garzawicker

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container-fluid"> <!-- Second navbar for search --> <nav class="navbar navbar"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-search"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse"> <ul class="nav navbar-nav navbar-right"> <li><a href="#">About</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li role="separator" class="divider"></li> <li><a href="#">Separated link</a></li> <li role="separator" class="divider"></li> <li><a href="#">One more separated link</a></li> </ul> </li> <li><a href="#">Prospective Students</a></li> <li><a href="#">Academics</a></li> <li><a href="#">Alumni & Friends</a></li> <li><a href="#">Atheltics</a></li> <li> <a class="btn btn-default btn-outline btn-circle collapsed" data-toggle="collapse" href="#navbar-search" aria-expanded="false" aria-controls="nav-collapse3">Search</a> </li> </ul> <div class="collapse nav navbar-nav nav-collapse slide-down" id="navbar-search"> <form class="navbar-form navbar-right" role="search"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search" /> </div> <button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button> </form> </div> </div><!-- /.navbar-collapse --> </div><!-- /.container --> </nav><!-- /.navbar --> </div><!-- /.container-fluid -->
/* Code snippet by maridlcrmn for Bootsnipp.com Follow me on Twitter @maridlcrmn */ #navbar-search{ background:white; } .navbar .navbar-nav { display: inline-block; float: none; } .navbar-brand { position: relative; z-index: 2; } .navbar-nav.navbar-right .btn { position: relative; z-index: 2; padding: 4px 20px; margin: 10px auto; transition: transform 0.3s; } .navbar .navbar-collapse { position: relative; overflow: hidden !important; } .navbar .navbar-collapse .navbar-right > li:last-child { padding-left: 50px; } .navbar .nav-collapse { position: absolute; z-index: 1; top: 0; left: 0; right: 0; bottom: 0; margin: 0; padding-right: 120px; padding-left: 80px; width: 100%; } .navbar.navbar-default .nav-collapse { background-color: #f8f8f8; } .navbar .nav-collapse .navbar-form { border-width: 1; box-shadow: none; } .nav-collapse>li { float: right; } .btn.btn-circle { border-radius: 50px; } .btn.btn-outline { background-color: #fff; } .navbar-nav.navbar-right .btn:not(.collapsed) { background-color: rgb(111, 84, 153); border-color: rgb(111, 84, 153); color: rgb(255, 255, 255); } .navbar.navbar-default .nav-collapse, .navbar.navbar-inverse .nav-collapse { height: auto !important; transition: transform 0.3s; transform: translate(0px,-50px); } .navbar.navbar-default .nav-collapse.in, .navbar.navbar-inverse .nav-collapse.in { transform: translate(0px,0px); } @media screen and (max-width: 767px) { .navbar .navbar-collapse { text-align: center; } .navbar .navbar-collapse > li:last-child { padding-left: 15px; padding-right: 15px; } .navbar .nav-collapse .navbar-form { margin: 0; } .nav-collapse>li { float: none; } .navbar.navbar-default .nav-collapse, .navbar.navbar-inverse .nav-collapse { transform: translate(-100%,0px); } .navbar.navbar-default .nav-collapse.in, .navbar.navbar-inverse .nav-collapse.in { transform: translate(0px,0px); } .navbar.navbar-default .nav-collapse.slide-down, .navbar.navbar-inverse .nav-collapse.slide-down { transform: translate(0px,-100%); background:white; } .navbar.navbar-default .nav-collapse.in.slide-down, .navbar.navbar-inverse .nav-collapse.in.slide-down { transform: translate(0px,0px); } }

Related: See More


Questions / Comments: