Bootstrap Dropdowns
- Bootstrap provides a simple and powerful way to create dropdown menus for your website.
- In this page, we will cover how to use Bootstrap dropdowns to enhance your website's navigation.
Syntax
To create a Bootstrap dropdown, you can use the following HTML structure:
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>