"NavBar and Form Login"
Bootstrap 3.3.0 Snippet by skj267

<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="navbar-wrapper"> <div class="container-fluid"> <nav class="navbar navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Logo</a> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#" class="">Home</a></li> <li class=" dropdown"> <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Departments <span class="caret"></span></a> <ul class="dropdown-menu"> <li class=" dropdown"> <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">View Departments</a> </li> <li><a href="#">Add New</a></li> </ul> </li> <li><a href="addnew.html">Add New</a></li> <li class=" dropdown"><a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Managers <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">View Managers</a></li> <li><a href="#">Add New</a></li> </ul> </li> <li class=" dropdown"><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Staff <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">View Staff</a></li> <li><a href="#">Add New</a></li> <li><a href="#">Bulk Upload</a></li> </ul> </li> <li class=" down"><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">HR <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Change Time Entry</a></li> <li><a href="#">Report</a></li> </ul> </li> </ul> <ul class="nav navbar-nav pull-right"> <li class=" dropdown"><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Signed in as <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Change Password</a></li> <li><a href="#">My Profile</a></li> </ul> </li> <li class=""><a href="#">Logout</a></li> </ul> </div> </div> </nav> </div> </div> <!-- ================ INICIA FORMULARIO DE LOGIN ============================================================== --> <div class="container"> <div class="row" style="margin-top:60px"> <div class="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3"> <form role="form"> <fieldset> <h2>Please Sign In</h2> <hr class="colorgraph"> <div class="form-group"> <input type="email" name="email" id="email" class="form-control input-lg" placeholder="Email Address"> </div> <div class="form-group"> <input type="password" name="password" id="password" class="form-control input-lg" placeholder="Password"> </div> <span class="button-checkbox"> <button type="button" class="btn" data-color="info">Remember Me</button> <input type="checkbox" name="remember_me" id="remember_me" checked="checked" class="hidden"> <a href="" class="btn btn-link pull-right">Forgot Password?</a> </span> <hr class="colorgraph"> <div class="row"> <div class="col-xs-6 col-sm-6 col-md-6"> <input type="submit" class="btn btn-lg btn-success btn-block" value="Sign In"> </div> <div class="col-xs-6 col-sm-6 col-md-6"> <a href="" class="btn btn-lg btn-primary btn-block">Register</a> </div> </div> </fieldset> </form> </div> </div> </div>
body{ background: #fff; } .navbar, .dropdown-menu{ background:#09ba32; border: none; } .nav>li>a, .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover, .dropdown-menu>li>a, .dropdown-menu>li{ border-bottom: 3px solid transparent; } .nav>li>a:focus, .nav>li>a:hover,.nav .open>a, .nav .open>a:focus, .nav .open>a:hover, .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover{ border-bottom: 3px solid transparent; background: rgba(154, 154, 154, 0.27); } .navbar a, .dropdown-menu>li>a, .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover, .navbar-toggle{ color: #fff; } .dropdown-menu{ -webkit-box-shadow: none; box-shadow:none; } .nav li:hover:nth-child(8n+1), .nav li.active:nth-child(8n+1){ border-bottom: #b6f423 4px solid; } .nav li:hover:nth-child(8n+2), .nav li.active:nth-child(8n+2){ border-bottom: #82e2ea 4px solid; } .nav li:hover:nth-child(8n+3), .nav li.active:nth-child(8n+3){ border-bottom: #f8b42c 4px solid; } .nav li:hover:nth-child(8n+4), .nav li.active:nth-child(8n+4){ border-bottom: #fd594a 4px solid; } .nav li:hover:nth-child(8n+5), .nav li.active:nth-child(8n+5){ border-bottom: #e8479d 4px solid; } .nav li:hover:nth-child(8n+6), .nav li.active:nth-child(8n+6){ border-bottom: #a12eeb 4px solid; } .nav li:hover:nth-child(8n+7), .nav li.active:nth-child(8n+7){ border-bottom: #4785d9 4px solid; } .nav li:hover:nth-child(8n+8), .nav li.active:nth-child(8n+8){ border-bottom: #2aed9a 4px solid; } .navbar-toggle .icon-bar{ color: #fff; background: #000000; } /* Credit to bootsnipp.com for the css for the color graph ESTO SOLO ES PARA EL FORMULARIO DE LOGIN */ .colorgraph { height: 5px; border-top: 0; background: #c4e17f; border-radius: 5px; background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); }
$(function(){ $('.button-checkbox').each(function(){ var $widget = $(this), $button = $widget.find('button'), $checkbox = $widget.find('input:checkbox'), color = $button.data('color'), settings = { on: { icon: 'glyphicon glyphicon-check' }, off: { icon: 'glyphicon glyphicon-unchecked' } }; $button.on('click', function () { $checkbox.prop('checked', !$checkbox.is(':checked')); $checkbox.triggerHandler('change'); updateDisplay(); }); $checkbox.on('change', function () { updateDisplay(); }); function updateDisplay() { var isChecked = $checkbox.is(':checked'); // Set the button's state $button.data('state', (isChecked) ? "on" : "off"); // Set the button's icon $button.find('.state-icon') .removeClass() .addClass('state-icon ' + settings[$button.data('state')].icon); // Update the button's color if (isChecked) { $button .removeClass('btn-default') .addClass('btn-' + color + ' active'); } else { $button .removeClass('btn-' + color + ' active') .addClass('btn-default'); } } function init() { updateDisplay(); // Inject the icon if applicable if ($button.find('.state-icon').length == 0) { $button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i> '); } } init(); }); });

Related: See More


Questions / Comments: