Drop down Menus in Bootstrap
0 3530
Drop down Menus in Bootstrap - Bootstrap provides an easy drop down menu to an element via data attributes.
- .dropdown class use for Dropdown menu.
Example:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Bootstrap </title>
<meta name="viewport" content="idth=device-width, initial-scale=1">
<!- Bootstrap css file ->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1> Bootstrap Dropdown </h1>
<div class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-info"> Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header"> Dropdown Heading 1 </li>
<li> <a href="#"> Home </a></li>
<li> <a href="#"> About us </a></li>
<li role="presentation" class="divider"></li>
<li class="dropdown-header"> Dropdown Heading 2 </li>
<li> <a href="#"> Products </a></li>
<li> <a href="#"> Services </a></li>
</li>
</ul>
</div>
</div>
<!- Bootstrap js file ->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"> </script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"> </script>
</body>
</html>
Share:
Comments
Waiting for your comments