2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-20 20:00:36 +03:00

markdownify button dropdowns

This commit is contained in:
Mark Otto
2014-07-13 01:23:29 -07:00
parent 35d87bcb25
commit 4a5f1f036b
+22 -14
View File
@@ -3,18 +3,17 @@ layout: page
title: Button dropdown title: Button dropdown
--- ---
<div class="bs-docs-section"> Use any button to trigger a dropdown menu by placing it within a `.btn-group` and providing the proper menu markup.
<h1 id="btn-dropdowns" class="page-header">Button dropdowns</h1>
<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> <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> <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> ### Single button dropdowns
<p>Turn a button into a dropdown toggle with some basic markup changes.</p>
Turn a button into a dropdown toggle with some basic markup changes.
<div class="bs-example"> <div class="bs-example">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">Default</button> <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">Default</button>
@@ -77,6 +76,7 @@ title: Button dropdown
</ul> </ul>
</div><!-- /btn-group --> </div><!-- /btn-group -->
</div> </div>
{% highlight html %} {% highlight html %}
<!-- Single button --> <!-- Single button -->
<div class="btn-group"> <div class="btn-group">
@@ -93,8 +93,10 @@ title: Button dropdown
</div> </div>
{% endhighlight %} {% endhighlight %}
<h3 id="btn-dropdowns-split">Split button dropdowns</h3> ### Split button dropdowns
<p>Similarly, create split button dropdowns with the same markup changes, only with a separate button.</p>
<Similarly, create split button dropdowns with the same markup changes, only with a separate button.
<div class="bs-example"> <div class="bs-example">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-secondary">Default</button> <button type="button" class="btn btn-secondary">Default</button>
@@ -175,6 +177,7 @@ title: Button dropdown
</ul> </ul>
</div><!-- /btn-group --> </div><!-- /btn-group -->
</div> </div>
{% highlight html %} {% highlight html %}
<!-- Split button --> <!-- Split button -->
<div class="btn-group"> <div class="btn-group">
@@ -192,8 +195,10 @@ title: Button dropdown
</div> </div>
{% endhighlight %} {% endhighlight %}
<h3 id="btn-dropdowns-sizing">Sizing</h3> ### Sizing
<p>Button dropdowns work with buttons of all sizes.</p>
Button dropdowns work with buttons of all sizes.
<div class="bs-example"> <div class="bs-example">
<div class="btn-toolbar" role="toolbar"> <div class="btn-toolbar" role="toolbar">
<div class="btn-group"> <div class="btn-group">
@@ -238,6 +243,7 @@ title: Button dropdown
</div><!-- /btn-group --> </div><!-- /btn-group -->
</div><!-- /btn-toolbar --> </div><!-- /btn-toolbar -->
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<!-- Large button group --> <!-- Large button group -->
<div class="btn-group"> <div class="btn-group">
@@ -270,8 +276,10 @@ title: Button dropdown
</div> </div>
{% endhighlight %} {% endhighlight %}
<h3 id="btn-dropdowns-dropup">Dropup variation</h3> ### Dropup variation
<p>Trigger dropdown menus above elements by adding <code>.dropup</code> to the parent.</p>
Trigger dropdown menus above elements by adding `.dropup` to the parent.
<div class="bs-example"> <div class="bs-example">
<div class="btn-toolbar" role="toolbar"> <div class="btn-toolbar" role="toolbar">
<div class="btn-group dropup"> <div class="btn-group dropup">
@@ -301,7 +309,8 @@ title: Button dropdown
</ul> </ul>
</div><!-- /btn-group --> </div><!-- /btn-group -->
</div> </div>
</div><!-- /example --> </div>
{% highlight html %} {% highlight html %}
<div class="btn-group dropup"> <div class="btn-group dropup">
<button type="button" class="btn btn-secondary">Dropup</button> <button type="button" class="btn btn-secondary">Dropup</button>
@@ -313,4 +322,3 @@ title: Button dropdown
</ul> </ul>
</div> </div>
{% endhighlight %} {% endhighlight %}
</div>