Bs Dropdowns
Bootstrap Dropdowns
Basic Dropdown
Influenza A virus subtype H5N1 dropdown carte is a toggleable carte that allows the user to select ane value from a predefined list:Example
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">HTML</a></li>
<li><a href="#">CSS</a></li>
<li><a href="#">JavaScript</a></li>
</ul>
</div> Example Explained
The.dropdown shape indicates a dropdown menu.To opened upwards the dropdown menu, exercise a push or a link alongside a shape of
.dropdown-toggle as well as the data-toggle="dropdown" attribute.The
.caret shape creates a caret arrow prototype (), which indicates that the push is a dropdown.Add the
.dropdown-menu shape to a <ul> chemical subdivision to genuinely construct the dropdown menu.Dropdown Divider
The.divider shape is used to separate links within the dropdown carte alongside a sparse horizontal border:Example
<li class="divider"></li> Dropdown Header
.dropdown-header shape is used to add together headers within the dropdown menu:Example
<li class="dropdown-header">Dropdown header 1</li> Disable as well as Active items
To disable an especial inwards the dropdown menu, exercise the
.disabled shape (gets a light-grey text color as well as a "no-parking-sign" prototype on hover):Example
<li class="disabled"><a href="#">CSS</a></li>
<li class="active"><a href="#">HTML</a></li> Dropdown Position
.dropdown-menu-right shape to the chemical subdivision alongside .dropdown-menu:Example
<ul class="dropdown-menu dropdown-menu-right"> Dropup
"dropup":Example
<div class="dropup"> Dropdown Accessibility
To assistance better accessibility for people using covert readers, y'all should include the nextrole as well as aria-* attributes, when creating a dropdown menu:Example
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="menu1" data-toggle="dropdown">Tutorials
<span class="caret"></span></button>
<ul class="dropdown-menu" role="menu" aria-labelledby="menu1">
<li role="presentation"><a role="menuitem" href="#">HTML</a></li>
<li role="presentation"><a role="menuitem" href="#">CSS</a></li>
<li role="presentation"><a role="menuitem" href="#">JavaScript</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" href="#">About Us</a></li>
</ul>
</div>
Comments
Post a Comment