0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

markdownify button dropdowns

This commit is contained in:
Mark Otto 2014-07-13 01:23:29 -07:00
parent 35d87bcb25
commit 4a5f1f036b

View File

@ -3,19 +3,18 @@ layout: page
title: Button dropdown
---
<div class="bs-docs-section">
<h1 id="btn-dropdowns" class="page-header">Button dropdowns</h1>
Use any button to trigger a dropdown menu by placing it within a `.btn-group` and providing the proper menu markup.
<p class="lead">Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and providing the proper menu markup.</p>
<div class="bs-callout bs-callout-danger">
<div class="bs-callout bs-callout-danger">
<h4>Plugin dependency</h4>
<p>Button dropdowns require the <a href="../javascript/#dropdowns">dropdown plugin</a> to be included in your version of Bootstrap.</p>
</div>
</div>
<h3 id="btn-dropdowns-single">Single button dropdowns</h3>
<p>Turn a button into a dropdown toggle with some basic markup changes.</p>
<div class="bs-example">
### Single button dropdowns
Turn a button into a dropdown toggle with some basic markup changes.
<div class="bs-example">
<div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">Default</button>
<ul class="dropdown-menu" role="menu">
@ -76,7 +75,8 @@ title: Button dropdown
<li><a href="#">Separated link</a></li>
</ul>
</div><!-- /btn-group -->
</div>
</div>
{% highlight html %}
<!-- Single button -->
<div class="btn-group">
@ -93,9 +93,11 @@ title: Button dropdown
</div>
{% endhighlight %}
<h3 id="btn-dropdowns-split">Split button dropdowns</h3>
<p>Similarly, create split button dropdowns with the same markup changes, only with a separate button.</p>
<div class="bs-example">
### Split button dropdowns
<Similarly, create split button dropdowns with the same markup changes, only with a separate button.
<div class="bs-example">
<div class="btn-group">
<button type="button" class="btn btn-secondary">Default</button>
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">
@ -174,7 +176,8 @@ title: Button dropdown
<li><a href="#">Separated link</a></li>
</ul>
</div><!-- /btn-group -->
</div>
</div>
{% highlight html %}
<!-- Split button -->
<div class="btn-group">
@ -192,9 +195,11 @@ title: Button dropdown
</div>
{% endhighlight %}
<h3 id="btn-dropdowns-sizing">Sizing</h3>
<p>Button dropdowns work with buttons of all sizes.</p>
<div class="bs-example">
### Sizing
Button dropdowns work with buttons of all sizes.
<div class="bs-example">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group">
<button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-toggle="dropdown">
@ -237,7 +242,8 @@ title: Button dropdown
</ul>
</div><!-- /btn-group -->
</div><!-- /btn-toolbar -->
</div><!-- /example -->
</div><!-- /example -->
{% highlight html %}
<!-- Large button group -->
<div class="btn-group">
@ -270,9 +276,11 @@ title: Button dropdown
</div>
{% endhighlight %}
<h3 id="btn-dropdowns-dropup">Dropup variation</h3>
<p>Trigger dropdown menus above elements by adding <code>.dropup</code> to the parent.</p>
<div class="bs-example">
### Dropup variation
Trigger dropdown menus above elements by adding `.dropup` to the parent.
<div class="bs-example">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group dropup">
<button type="button" class="btn btn-secondary">Dropup</button>
@ -301,7 +309,8 @@ title: Button dropdown
</ul>
</div><!-- /btn-group -->
</div>
</div><!-- /example -->
</div>
{% highlight html %}
<div class="btn-group dropup">
<button type="button" class="btn btn-secondary">Dropup</button>
@ -313,4 +322,3 @@ title: Button dropdown
</ul>
</div>
{% endhighlight %}
</div>