mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-10 22:24:19 +01:00
apply most minor changes from master branch
This commit is contained in:
parent
6d926d2eee
commit
24d2e39cf4
@ -68,7 +68,7 @@
|
||||
</button>
|
||||
<a href="../" class="navbar-brand">Bootstrap</a>
|
||||
</div>
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../getting-started/">Getting started</a>
|
||||
@ -1123,15 +1123,15 @@
|
||||
|
||||
<h2 id="glyphicons-how-to-use">How to use</h2>
|
||||
<p>For performance reasons, all icons require a base class and individual icon class. To use, place the following code just about anywhere. Be sure to leave a space between the icon and text for proper padding.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-glyphicons-dont-mix">
|
||||
<h4>Don't mix with other components</h4>
|
||||
<p>Icon classes cannot be directly combined with other components. They should not be used along with other classes on the same element. Instead, add a nested <code><span></code> and apply the icon classes to the <code><span></code>.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-glyphicons-empty-only">
|
||||
<h4>Only for use on empty elements</h4>
|
||||
<p>Icon classes should only be used on elements that contain no text content and have no child elements.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-glyphicons-location">
|
||||
<h4>Changing the icon font location</h4>
|
||||
<p>Bootstrap assumes icon font files will be located in the <code>../fonts/</code> directory, relative to the compiled CSS files. Moving or renaming those font files means updating the CSS in one of three ways:</p>
|
||||
<ul>
|
||||
@ -1141,7 +1141,7 @@
|
||||
</ul>
|
||||
<p>Use whatever option best suits your specific development setup.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-glyphicons-accessibility">
|
||||
<h4>Accessible icons</h4>
|
||||
<p>Modern versions of assistive technologies will announce CSS generated content, as well as specific Unicode characters. To avoid unintended and confusing output in screen readers (particularly when icons are used purely for decoration), we hide them with the <code>aria-hidden="true"</code> attribute.</p>
|
||||
<p>If you're using an icon to convey meaning (rather than only as a decorative element), ensure that this meaning is also conveyed to assistive technologies – for instance, include additional content, visually hidden with the <code>.sr-only</code> class.</p>
|
||||
@ -1152,7 +1152,7 @@
|
||||
|
||||
<h2 id="glyphicons-examples">Examples</h2>
|
||||
<p>Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="glyphicons-general">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default" aria-label="Left Align"><span class="glyphicon glyphicon-align-left" aria-hidden="true"></span></button>
|
||||
@ -1176,7 +1176,7 @@
|
||||
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"glyphicon glyphicon-star"</span> <span class="na">aria-hidden=</span><span class="s">"true"</span><span class="nt">></span></span> Star
|
||||
<span class="nt"></button></span></code></pre></div>
|
||||
<p>An icon used in an <a href="#alerts">alert</a> to convey that it's an error message, with additional <code>.sr-only</code> text to convey this hint to users of assistive technologies.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="glyphicons-accessibility">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
||||
<span class="sr-only">Error:</span>
|
||||
@ -1197,7 +1197,7 @@
|
||||
|
||||
<h3 id="dropdowns-example">Example</h3>
|
||||
<p>Wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then add the menu's HTML.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="static-dropdown">
|
||||
<div class="dropdown clearfix">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
|
||||
Dropdown
|
||||
@ -1226,11 +1226,11 @@
|
||||
|
||||
<h3 id="dropdowns-alignment">Alignment</h3>
|
||||
<p>By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add <code>.dropdown-menu-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-dropdown-positioning">
|
||||
<h4>May require additional positioning</h4>
|
||||
<p>Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain <code>overflow</code> properties or appear out of bounds of the viewport. Address these issues on your own as they arise.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-dropdown-pull-right">
|
||||
<h4>Deprecated <code>.pull-right</code> alignment</h4>
|
||||
<p>As of v3.1.0, we've deprecated <code>.pull-right</code> on dropdown menus. To right-align a menu, use <code>.dropdown-menu-right</code>. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use <code>.dropdown-menu-left</code>.</p>
|
||||
</div>
|
||||
@ -1312,12 +1312,12 @@
|
||||
|
||||
<p class="lead">Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with <a href="../javascript/#buttons">our buttons plugin</a>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-btn-group-tooltips">
|
||||
<h4>Tooltips & popovers in button groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within a <code>.btn-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-btn-group-accessibility">
|
||||
<h4>Ensure correct <code>role</code> and provide a label</h4>
|
||||
<p>In order for assistive technologies – such as screen readers – to convey that a series of buttons is grouped, an appropriate <code>role</code> attribute needs to be provided. For button groups, this would be <code>role="group"</code>, while toolbars should have a <code>role="toolbar"</code>.</p>
|
||||
<p>One exception are groups which only contain a single control (for instance the <a href="#btn-groups-justified">justified button groups</a> with <code><button></code> elements) or a dropdown.</p>
|
||||
@ -1326,7 +1326,7 @@
|
||||
|
||||
<h3 id="btn-groups-single">Basic example</h3>
|
||||
<p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-button-group">
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
@ -1341,7 +1341,7 @@
|
||||
|
||||
<h3 id="btn-groups-toolbar">Button toolbar</h3>
|
||||
<p>Combine sets of <code><div class="btn-group"></code> into a <code><div class="btn-toolbar"></code> for more complex components.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-button-toolbar">
|
||||
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
|
||||
<div class="btn-group" role="group" aria-label="First group">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
@ -1366,8 +1366,8 @@
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<h3 id="btn-groups-sizing">Sizing</h3>
|
||||
<p>Instead of applying button sizing classes to every button in a group, just add <code>.btn-group-*</code> to the <code>.btn-group</code>.</p>
|
||||
<div class="bs-example">
|
||||
<p>Instead of applying button sizing classes to every button in a group, just add <code>.btn-group-*</code> to each <code>.btn-group</code>, including when nesting multiple groups.</p>
|
||||
<div class="bs-example" data-example-id="button-group-sizing">
|
||||
<div class="btn-group btn-group-lg" role="group" aria-label="Large button group">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
<button type="button" class="btn btn-default">Middle</button>
|
||||
@ -1399,7 +1399,7 @@
|
||||
|
||||
<h3 id="btn-groups-nested">Nesting</h3>
|
||||
<p>Place a <code>.btn-group</code> within another <code>.btn-group</code> when you want dropdown menus mixed with a series of buttons.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="button-group-nesting">
|
||||
<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
<button type="button" class="btn btn-default">2</button>
|
||||
@ -1434,7 +1434,7 @@
|
||||
|
||||
<h3 id="btn-groups-vertical">Vertical variation</h3>
|
||||
<p>Make a set of buttons appear vertically stacked rather than horizontally. <strong class="text-danger">Split button dropdowns are not supported here.</strong></p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="vertical-button-group">
|
||||
<div class="btn-group-vertical" role="group" aria-label="Vertical button group">
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
<button type="button" class="btn btn-default">Button</button>
|
||||
@ -1489,11 +1489,11 @@
|
||||
<h3 id="btn-groups-justified">Justified button groups</h3>
|
||||
<p>Make a group of buttons stretch at equal sizes to span the entire width of its parent. Also works with button dropdowns within the button group.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-btn-group-justified-dbl-border">
|
||||
<h4>Handling borders</h4>
|
||||
<p>Due to the specific HTML and CSS used to justify buttons (namely <code>display: table-cell</code>), the borders between them are doubled. In regular button groups, <code>margin-left: -1px</code> is used to stack the borders instead of removing them. However, <code>margin</code> doesn't work with <code>display: table-cell</code>. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-btn-group-ie8-border">
|
||||
<h4>IE8 and borders</h4>
|
||||
<p>Internet Explorer 8 doesn't render borders on buttons in a justified button group, whether it's on <code><a></code> or <code><button></code> elements. To get around that, wrap each button in another <code>.btn-group</code>.</p>
|
||||
<p>See <a href="https://github.com/twbs/bootstrap/issues/12476">#12476</a> for more information.</p>
|
||||
@ -1501,7 +1501,7 @@
|
||||
|
||||
<h4>With <code><a></code> elements</h4>
|
||||
<p>Just wrap a series of <code>.btn</code>s in <code>.btn-group.btn-group-justified</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-justified-button-group">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group">
|
||||
<a href="#" class="btn btn-default" role="button">Left</a>
|
||||
<a href="#" class="btn btn-default" role="button">Middle</a>
|
||||
@ -1529,14 +1529,14 @@
|
||||
...
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<h4>Links acting as buttons</h4>
|
||||
<p>If the <code><a></code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
|
||||
<div class="bs-callout bs-callout-warning" id="callout-btn-group-anchor-btn">
|
||||
<h4>Links acting as buttons</h4>
|
||||
<p>If the <code><a></code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
|
||||
</div>
|
||||
|
||||
<h4>With <code><button></code> elements</h4>
|
||||
<p>To use justified button groups with <code><button></code> elements, <strong class="text-danger">you must wrap each button in a button group</strong>. Most browsers don't properly apply our CSS for justification to <code><button></code> elements, but since we support button dropdowns, we can work around that.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="button-tag-button-group-justified">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="Justified button group">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default">Left</button>
|
||||
@ -1567,14 +1567,14 @@
|
||||
|
||||
<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" id="callout-btndropdown-dependency">
|
||||
<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>
|
||||
|
||||
<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">
|
||||
<div class="bs-example" data-example-id="single-button-dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Default <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
@ -1652,7 +1652,7 @@
|
||||
|
||||
<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">
|
||||
<div class="bs-example" data-example-id="split-button-dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -1756,7 +1756,7 @@
|
||||
|
||||
<h3 id="btn-dropdowns-sizing">Sizing</h3>
|
||||
<p>Button dropdowns work with buttons of all sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="button-dropdown-sizing">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -1832,7 +1832,7 @@
|
||||
|
||||
<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">
|
||||
<div class="bs-example" data-example-id="button-dropdown-dropup">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-default">Dropup</button>
|
||||
@ -1881,26 +1881,30 @@
|
||||
|
||||
<p class="lead">Extend form controls by adding text or buttons before, after, or on both sides of any text-based <code><input></code>. Use <code>.input-group</code> with an <code>.input-group-addon</code> to prepend or append elements to a single <code>.form-control</code>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-inputgroup-text-input-only">
|
||||
<h4>Textual <code><input></code>s only</h4>
|
||||
<p>Avoid using <code><select></code> elements here as they cannot be fully styled in WebKit browsers.</p>
|
||||
<p>Avoid using <code><textarea></code> elements here as their <code>rows</code> attribute will not be respected in some cases.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-inputgroup-container-body">
|
||||
<h4>Tooltips & popovers in input groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-inputgroup-dont-mix">
|
||||
<h4>Don't mix with other components</h4>
|
||||
<p>Do not mix form groups or grid column classes directly with input groups. Instead, nest the input group inside of the form group or grid-related element.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-inputgroup-form-labels">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these input groups, ensure that any additional label or functionality is conveyed to assistive technologies.</p>
|
||||
<p>The exact technique to be used (<code><label></code> elements hidden using the <code>.sr-only</code> class, or use of the <code>aria-label</code>, <code>aria-labelledby</code>, <code>aria-describedby</code>, <code>title</code> or <code>placeholder</code> attribute) and what additional information will need to be conveyed will vary depending on the exact type of interface widget you're implementing. The examples in this section provide a few suggested, case-specific approaches.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="input-groups-basic">Basic example</h2>
|
||||
<p>Place one add-on or button on either side of an input. You may also place one on both sides of an input.</p>
|
||||
<p><strong class="text-danger">We do not support multiple add-ons on a single side.</strong></p>
|
||||
<p><strong class="text-danger">We do not support multiple form-controls in a single input group.</strong></p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<form class="bs-example bs-example-form" data-example-id="simple-input-groups">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
@ -1935,7 +1939,7 @@
|
||||
|
||||
<h2 id="input-groups-sizing">Sizing</h2>
|
||||
<p>Add the relative form sizing classes to the <code>.input-group</code> itself and contents within will automatically resize—no need for repeating the form control size classes on each element.</p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<form class="bs-example bs-example-form" data-example-id="input-group-sizing">
|
||||
<div class="input-group input-group-lg">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username">
|
||||
@ -1969,7 +1973,7 @@
|
||||
|
||||
<h2 id="input-groups-checkboxes-radios">Checkboxes and radio addons</h2>
|
||||
<p>Place any checkbox or radio option within an input group's addon instead of text.</p>
|
||||
<form class="bs-example bs-example-form">
|
||||
<form class="bs-example bs-example-form" data-example-id="input-group-with-checkbox-radio">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
@ -2011,7 +2015,7 @@
|
||||
|
||||
<h2 id="input-groups-buttons">Button addons</h2>
|
||||
<p>Buttons in input groups are a bit different and require one extra level of nesting. Instead of <code>.input-group-addon</code>, you'll need to use <code>.input-group-btn</code> to wrap the buttons. This is required due to default browser styles that cannot be overridden.</p>
|
||||
<form class="bs-example bs-example-form">
|
||||
<form class="bs-example bs-example-form" data-example-id="input-group-with-button">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
@ -2052,7 +2056,7 @@
|
||||
|
||||
<h2 id="input-groups-buttons-dropdowns">Buttons with dropdowns</h2>
|
||||
<p></p>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<form class="bs-example bs-example-form" data-example-id="input-group-dropdowns">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
@ -2120,7 +2124,7 @@
|
||||
<span class="nt"></div></span><span class="c"><!-- /.row --></span></code></pre></div>
|
||||
|
||||
<h2 id="input-groups-buttons-segmented">Segmented buttons</h2>
|
||||
<form class="bs-example bs-example-form" role="form">
|
||||
<form class="bs-example bs-example-form" data-example-id="input-group-segmented-buttons">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
@ -2182,19 +2186,19 @@
|
||||
|
||||
<p class="lead">Navs available in Bootstrap have shared markup, starting with the base <code>.nav</code> class, as well as shared states. Swap modifier classes to switch between each style.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-navs-tabs-plugin">
|
||||
<h4>Using navs for tab panels requires JavaScript tabs plugin</h4>
|
||||
<p>For tabs with tabbable areas, you must use the <a href="../javascript/#tabs">tabs JavaScript plugin</a>. The markup will also require additional <code>role</code> and ARIA attributes – see the plugin's <a href="../javascript/#tabs-usage">example markup</a> for further details.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navs-accessibility">
|
||||
<h4>Make navs used as navigation accessible</h4>
|
||||
<p>If you are using navs to provide a navigation bar, be sure to add a <code>role="navigation"</code> to the most logical parent container of the <code><ul></code>, or wrap a <code><nav></code> element around the whole navigation. Do not add the role to the <code><ul></code> itself, as this would prevent it from being announced as an actual list by assistive technologies.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="nav-tabs">Tabs</h2>
|
||||
<p>Note the <code>.nav-tabs</code> class requires the <code>.nav</code> base class.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-nav-tabs">
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="#">Home</a></li>
|
||||
<li role="presentation"><a href="#">Profile</a></li>
|
||||
@ -2210,7 +2214,7 @@
|
||||
|
||||
<h2 id="nav-pills">Pills</h2>
|
||||
<p>Take that same HTML, but use <code>.nav-pills</code> instead:</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-nav-pills">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" class="active"><a href="#">Home</a></li>
|
||||
<li role="presentation"><a href="#">Profile</a></li>
|
||||
@ -2223,7 +2227,7 @@
|
||||
<span class="nt"><li</span> <span class="na">role=</span><span class="s">"presentation"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Messages<span class="nt"></a></li></span>
|
||||
<span class="nt"></ul></span></code></pre></div>
|
||||
<p>Pills are also vertically stackable. Just add <code>.nav-stacked</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-nav-stacked">
|
||||
<ul class="nav nav-pills nav-stacked" style="max-width: 300px;">
|
||||
<li role="presentation" class="active"><a href="#">Home</a></li>
|
||||
<li role="presentation"><a href="#">Profile</a></li>
|
||||
@ -2238,11 +2242,11 @@
|
||||
<h2 id="nav-justified">Justified</h2>
|
||||
<p>Easily make tabs or pills equal widths of their parent at screens wider than 768px with <code>.nav-justified</code>. On smaller screens, the nav links are stacked.</p>
|
||||
<p><strong class="text-danger">Justified navbar nav links are currently not supported.</strong></p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navs-justified-safari">
|
||||
<h4>Safari and responsive justified navs</h4>
|
||||
<p>As of v8.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing. This bug is also shown in the <a href="../examples/justified-nav/">justified nav example</a>.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-nav-justified">
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li role="presentation" class="active"><a href="#">Home</a></li>
|
||||
<li role="presentation"><a href="#">Profile</a></li>
|
||||
@ -2266,12 +2270,12 @@
|
||||
<h2 id="nav-disabled-links">Disabled links</h2>
|
||||
<p>For any nav component (tabs or pills), add <code>.disabled</code> for <strong>gray links and no hover effects</strong>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navs-anchor-disabled">
|
||||
<h4>Link functionality not impacted</h4>
|
||||
<p>This class will only change the <code><a></code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="disabled-nav-link">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation"><a href="#">Clickable link</a></li>
|
||||
<li role="presentation"><a href="#">Clickable link</a></li>
|
||||
@ -2289,7 +2293,7 @@
|
||||
<p>Add dropdown menus with a little extra HTML and the <a href="../javascript/#dropdowns">dropdowns JavaScript plugin</a>.</p>
|
||||
|
||||
<h3>Tabs with dropdowns</h3>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="nav-tabs-with-dropdown">
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="active"><a href="#">Home</a></li>
|
||||
<li role="presentation"><a href="#">Help</a></li>
|
||||
@ -2321,7 +2325,7 @@
|
||||
<span class="nt"></ul></span></code></pre></div>
|
||||
|
||||
<h3>Pills with dropdowns</h3>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="nav-pills-with-dropdown">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" class="active"><a href="#">Home</a></li>
|
||||
<li role="presentation"><a href="#">Help</a></li>
|
||||
@ -2369,21 +2373,21 @@
|
||||
<li>Change the point at which your navbar switches between collapsed and horizontal mode. Customize the <code>@grid-float-breakpoint</code> variable or add your own media query.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-navbar-js">
|
||||
<h4>Requires JavaScript plugin</h4>
|
||||
<p>If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the <code>.navbar-collapse</code>.</p>
|
||||
<p>The responsive navbar requires the <a href="../javascript/#collapse">collapse plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-navbar-breakpoint">
|
||||
<h4>Changing the collapsed mobile navbar breakpoint</h4>
|
||||
<p>The navbar collapses into its vertical mobile view when the viewport is narrower than <code>@grid-float-breakpoint</code>, and expands into its horizontal non-mobile view when the viewport is at least <code>@grid-float-breakpoint</code> in width. Adjust this variable in the Less source to control when the navbar collapses/expands. The default value is <code>768px</code> (the smallest "small" or "tablet" screen).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navbar-role">
|
||||
<h4>Make navbars accessible</h4>
|
||||
<p>Be sure to add a <code>role="navigation"</code> to every navbar to help with accessibility.</p>
|
||||
<p>Be sure to use a <code><nav></code> element or, if using a more generic element such as a <code><div></code>, add a <code>role="navigation"</code> to every navbar to explicitly identify it as a landmark region for users of assistive technologies.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="default-navbar">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
@ -2495,7 +2499,7 @@
|
||||
|
||||
<h2 id="navbar-brand-image">Brand image</h2>
|
||||
<p>Replace the navbar brand with your own image by swapping the text for an <code><img></code>. Since the <code>.navbar-brand</code> has its own padding and height, you may need to override some CSS depending on your image.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="navbar-with-image-brand">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@ -2520,7 +2524,7 @@
|
||||
<h2 id="navbar-forms">Forms</h2>
|
||||
<p>Place form content within <code>.navbar-form</code> for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.</p>
|
||||
<p>As a heads up, <code>.navbar-form</code> shares much of its code with <code>.form-inline</code> via mixin. <strong class="text-danger">Some form controls, like input groups, may require fixed widths to be show up properly within a navbar.</strong></p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="navbar-form">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@ -2550,20 +2554,20 @@
|
||||
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"submit"</span> <span class="na">class=</span><span class="s">"btn btn-default"</span><span class="nt">></span>Submit<span class="nt"></button></span>
|
||||
<span class="nt"></form></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navbar-mobile-caveats">
|
||||
<h4>Mobile device caveats</h4>
|
||||
<p>There are some caveats regarding using form controls within fixed elements on mobile devices. <a href="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navbar-form-labels">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the <code>.sr-only</code> class.</p>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the <code>.sr-only</code> class. There are further alternative methods of providing a label for assistive technologies, such as the <code>aria-label</code>, <code>aria-labelledby</code> or <code>title</code> attribute. If none of these is present, screen readers may resort to using the <code>placeholder</code> attribute, if present, but note that use of <code>placeholder</code> as a replacement for other labelling methods is not advised.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 id="navbar-buttons">Buttons</h2>
|
||||
<p>Add the <code>.navbar-btn</code> class to <code><button></code> elements not residing in a <code><form></code> to vertically center them in the navbar.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="navbar-button">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@ -2583,14 +2587,14 @@
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"btn btn-default navbar-btn"</span><span class="nt">></span>Sign in<span class="nt"></button></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navbar-btn-context">
|
||||
<h4>Context-specific usage</h4>
|
||||
<p>Like the standard <a href="../css/#buttons">button classes</a>, <code>.navbar-btn</code> can be used on <code><a></code> and <code><input></code> elements. However, neither <code>.navbar-btn</code> nor the standard button classes should be used on <code><a></code> elements within <code>.navbar-nav</code>.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="navbar-text">Text</h2>
|
||||
<p>Wrap strings of text in an element with <code>.navbar-text</code>, usually on a <code><p></code> tag for proper leading and color.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="navbar-text">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@ -2613,7 +2617,7 @@
|
||||
|
||||
<h2 id="navbar-links">Non-nav links</h2>
|
||||
<p>For folks using standard links that are not within the regular navbar navigation component, use the <code>.navbar-link</code> class to add the proper colors for the default and inverse navbar options.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="navbar-link">
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@ -2637,7 +2641,7 @@
|
||||
<h2 id="navbar-component-alignment">Component alignment</h2>
|
||||
<p>Align nav links, forms, buttons, or text, using the <code>.navbar-left</code> or <code>.navbar-right</code> utility classes. Both classes will add a CSS float in the specified direction. For example, to align nav links, put them in a separate <code><ul></code> with the respective utility class applied.</p>
|
||||
<p>These classes are mixin-ed versions of <code>.pull-left</code> and <code>.pull-right</code>, but they're scoped to media queries for easier handling of navbar components across device sizes.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-navbar-right-align">
|
||||
<h4>Right aligning multiple components</h4>
|
||||
<p>Navbars currently have a limitation with multiple <code>.navbar-right</code> classes. To properly space content, we use negative margin on the last <code>.navbar-right</code> element. When there are multiple elements using that class, these margins don't work as intended.</p>
|
||||
<p>We'll revisit this when we can rewrite that component in v4.</p>
|
||||
@ -2646,7 +2650,7 @@
|
||||
|
||||
<h2 id="navbar-fixed-top">Fixed to top</h2>
|
||||
<p>Add <code>.navbar-fixed-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<div class="bs-example bs-navbar-top-example">
|
||||
<div class="bs-example bs-navbar-top-example" data-example-id="navbar-fixed-to-top">
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
@ -2676,7 +2680,7 @@
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></nav></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-navbar-fixed-top-padding">
|
||||
<h4>Body padding required</h4>
|
||||
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the top of the <code><body></code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
|
||||
<div class="highlight"><pre><code class="language-scss" data-lang="scss"><span class="nt">body</span> <span class="p">{</span> <span class="nl">padding-top</span><span class="p">:</span> <span class="m">70px</span><span class="p">;</span> <span class="p">}</span></code></pre></div>
|
||||
@ -2686,7 +2690,7 @@
|
||||
|
||||
<h2 id="navbar-fixed-bottom">Fixed to bottom</h2>
|
||||
<p>Add <code>.navbar-fixed-bottom</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<div class="bs-example bs-navbar-bottom-example">
|
||||
<div class="bs-example bs-navbar-bottom-example" data-example-id="navbar-fixed-to-bottom">
|
||||
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
@ -2716,7 +2720,7 @@
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></nav></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-navbar-fixed-bottom-padding">
|
||||
<h4>Body padding required</h4>
|
||||
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the bottom of the <code><body></code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
|
||||
<div class="highlight"><pre><code class="language-scss" data-lang="scss"><span class="nt">body</span> <span class="p">{</span> <span class="nl">padding-bottom</span><span class="p">:</span> <span class="m">70px</span><span class="p">;</span> <span class="p">}</span></code></pre></div>
|
||||
@ -2727,7 +2731,7 @@
|
||||
<h2 id="navbar-static-top">Static top</h2>
|
||||
<p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code> and include a <code>.container</code> or <code>.container-fluid</code> to center and pad navbar content.</p>
|
||||
<p>Unlike the <code>.navbar-fixed-*</code> classes, you do not need to change any padding on the <code>body</code>.</p>
|
||||
<div class="bs-example bs-navbar-top-example">
|
||||
<div class="bs-example bs-navbar-top-example" data-example-id="navbar-static-top">
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation">
|
||||
<!-- We use the fluid option here to avoid overriding the fixed width of a normal container within the narrow content columns. -->
|
||||
<div class="container-fluid">
|
||||
@ -2761,7 +2765,7 @@
|
||||
|
||||
<h2 id="navbar-inverted">Inverted navbar</h2>
|
||||
<p>Modify the look of the navbar by adding <code>.navbar-inverse</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="inverted-navbar">
|
||||
<nav class="navbar navbar-inverse" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
@ -2796,7 +2800,7 @@
|
||||
|
||||
<p class="lead">Indicate the current page's location within a navigational hierarchy.</p>
|
||||
<p>Separators are automatically added in CSS through <code>:before</code> and <code>content</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-breadcrumbs">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">Home</li>
|
||||
</ol>
|
||||
@ -2824,7 +2828,7 @@
|
||||
|
||||
<h2 id="pagination-default">Default pagination</h2>
|
||||
<p>Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-pagination">
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li><a href="#"><span aria-hidden="true">«</span><span class="sr-only">Previous</span></a></li>
|
||||
@ -2851,7 +2855,7 @@
|
||||
|
||||
<h3>Disabled and active states</h3>
|
||||
<p>Links are customizable for different circumstances. Use <code>.disabled</code> for unclickable links and <code>.active</code> to indicate the current page.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="disabled-active-pagination">
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li class="disabled"><a href="#"><span aria-hidden="true">«</span><span class="sr-only">Previous</span></a></li>
|
||||
@ -2883,7 +2887,7 @@
|
||||
|
||||
<h3>Sizing</h3>
|
||||
<p>Fancy larger or smaller pagination? Add <code>.pagination-lg</code> or <code>.pagination-sm</code> for additional sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="pagination-sizing">
|
||||
<nav>
|
||||
<ul class="pagination pagination-lg">
|
||||
<li><a href="#"><span aria-hidden="true">«</span><span class="sr-only">Previous</span></a></li>
|
||||
@ -2928,7 +2932,7 @@
|
||||
|
||||
<h3>Default example</h3>
|
||||
<p>By default, the pager centers links.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-pager">
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li><a href="#">Previous</a></li>
|
||||
@ -2945,7 +2949,7 @@
|
||||
|
||||
<h3>Aligned links</h3>
|
||||
<p>Alternatively, you can align each link to the sides:</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="aligned-pager-links">
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#"><span aria-hidden="true">←</span> Older</a></li>
|
||||
@ -2963,7 +2967,7 @@
|
||||
|
||||
<h3>Optional disabled state</h3>
|
||||
<p>Pager links also use the general <code>.disabled</code> utility class from the pagination.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="disabled-pager">
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous disabled"><a href="#"><span aria-hidden="true">←</span> Older</a></li>
|
||||
@ -2983,7 +2987,7 @@
|
||||
<h1 id="labels" class="page-header">Labels</h1>
|
||||
|
||||
<h3>Example</h3>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="labels-in-headings">
|
||||
<h1>Example heading <span class="label label-default">New</span></h1>
|
||||
<h2>Example heading <span class="label label-default">New</span></h2>
|
||||
<h3>Example heading <span class="label label-default">New</span></h3>
|
||||
@ -2995,7 +2999,7 @@
|
||||
|
||||
<h3>Available variations</h3>
|
||||
<p>Add any of the below mentioned modifier classes to change the appearance of a label.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="label-variants">
|
||||
<span class="label label-default">Default</span>
|
||||
<span class="label label-primary">Primary</span>
|
||||
<span class="label label-success">Success</span>
|
||||
@ -3010,7 +3014,7 @@
|
||||
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"label label-warning"</span><span class="nt">></span>Warning<span class="nt"></span></span>
|
||||
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"label label-danger"</span><span class="nt">></span>Danger<span class="nt"></span></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-labels-inline-block">
|
||||
<h4>Have tons of labels?</h4>
|
||||
<p>Rendering problems can arise when you have dozens of inline labels within a narrow container, each containing its own <code>inline-block</code> element (like an icon). The way around this is setting <code>display: inline-block;</code>. For context and an example, <a href="https://github.com/twbs/bootstrap/issues/13219">see #13219</a>.</p>
|
||||
</div>
|
||||
@ -3021,7 +3025,7 @@
|
||||
|
||||
<p class="lead">Easily highlight new or unread items by adding a <code><span class="badge"></code> to links, Bootstrap navs, and more.</p>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-badges">
|
||||
<a href="#">Inbox <span class="badge">42</span></a>
|
||||
<br><br>
|
||||
<button class="btn btn-primary" type="button">
|
||||
@ -3037,14 +3041,14 @@
|
||||
<h4>Self collapsing</h4>
|
||||
<p>When there are no new or unread items, badges will simply collapse (via CSS's <code>:empty</code> selector) provided no content exists within.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-badges-ie8-empty">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Badges won't self collapse in Internet Explorer 8 because it lacks support for the <code>:empty</code> selector.</p>
|
||||
</div>
|
||||
|
||||
<h4>Adapts to active nav states</h4>
|
||||
<p>Built-in styles are included for placing badges in active states in pill navigations.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="badges-in-pills">
|
||||
<ul class="nav nav-pills" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#">Home <span class="badge">42</span></a></li>
|
||||
<li role="presentation"><a href="#">Profile</a></li>
|
||||
@ -3062,7 +3066,7 @@
|
||||
<h1 id="jumbotron" class="page-header">Jumbotron</h1>
|
||||
|
||||
<p>A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-jumbotron">
|
||||
<div class="jumbotron">
|
||||
<h1>Hello, world!</h1>
|
||||
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
|
||||
@ -3086,7 +3090,7 @@
|
||||
<h1 id="page-header" class="page-header">Page header</h1>
|
||||
|
||||
<p>A simple shell for an <code>h1</code> to appropriately space out and segment sections of content on a page. It can utilize the <code>h1</code>'s default <code>small</code> element, as well as most other components (with additional styles).</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-page-header">
|
||||
<div class="page-header">
|
||||
<h1>Example page header <small>Subtext for header</small></h1>
|
||||
</div>
|
||||
@ -3103,7 +3107,7 @@
|
||||
|
||||
<h3 id="thumbnails-default">Default example</h3>
|
||||
<p>By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-thumbnails">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-3">
|
||||
<a href="#" class="thumbnail">
|
||||
@ -3138,7 +3142,7 @@
|
||||
|
||||
<h3 id="thumbnails-custom-content">Custom content</h3>
|
||||
<p>With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="thumbnails-with-custom-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
@ -3194,12 +3198,12 @@
|
||||
<h2 id="alerts-examples">Examples</h2>
|
||||
<p>Wrap any text and an optional dismiss button in <code>.alert</code> and one of the four contextual classes (e.g., <code>.alert-success</code>) for basic alert messages.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-alerts-no-default">
|
||||
<h4>No default class</h4>
|
||||
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-alerts">
|
||||
<div class="alert alert-success" role="alert">
|
||||
<strong>Well done!</strong> You successfully read this important alert message.
|
||||
</div>
|
||||
@ -3220,11 +3224,11 @@
|
||||
|
||||
<h2 id="alerts-dismissible">Dismissible alerts</h2>
|
||||
<p>Build on any alert by adding an optional <code>.alert-dismissible</code> and close button.</p>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-alerts-dismiss-plugin">
|
||||
<h4>Requires JavaScript alert plugin</h4>
|
||||
<p>For fully functioning, dismissible alerts, you must use the <a href="../javascript/#alerts">alerts JavaScript plugin</a>.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="dismissible-alert-css">
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<strong>Warning!</strong> Better check yourself, you're not looking too good.
|
||||
@ -3235,14 +3239,14 @@
|
||||
<span class="nt"><strong></span>Warning!<span class="nt"></strong></span> Better check yourself, you're not looking too good.
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-alerts-dismiss-use-button">
|
||||
<h4>Ensure proper behavior across all devices</h4>
|
||||
<p>Be sure to use the <code><button></code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="alerts-links">Links in alerts</h2>
|
||||
<p>Use the <code>.alert-link</code> utility class to quickly provide matching colored links within any alert.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="alerts-with-links">
|
||||
<div class="alert alert-success" role="alert">
|
||||
<strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.
|
||||
</div>
|
||||
@ -3275,14 +3279,14 @@
|
||||
|
||||
<p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-progress-animation-css3">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="progress-basic">Basic example</h3>
|
||||
<p>Default progress bar.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-progress-bar">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
|
||||
<span class="sr-only">60% Complete</span>
|
||||
@ -3296,8 +3300,8 @@
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<h3 id="progress-label">With label</h3>
|
||||
<p>Remove the <code>.sr-only</code> class from within the progress bar to show a visible percentage. For low percentages, consider adding a <code>min-width</code> to ensure the label's text is fully visible.</p>
|
||||
<div class="bs-example">
|
||||
<p>Remove the <code><span></code> with <code>.sr-only</code> class from within the progress bar to show a visible percentage.</p>
|
||||
<div class="bs-example" data-example-id="progress-bar-with-label">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
|
||||
60%
|
||||
@ -3338,7 +3342,7 @@
|
||||
|
||||
<h3 id="progress-alternatives">Contextual alternatives</h3>
|
||||
<p>Progress bars use some of the same button and alert classes for consistent styles.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="contextual-progress-bar">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
<span class="sr-only">40% Complete (success)</span>
|
||||
@ -3383,7 +3387,7 @@
|
||||
|
||||
<h3 id="progress-striped">Striped</h3>
|
||||
<p>Uses a gradient to create a striped effect. Not available in IE8.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="striped-progress-bar">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
|
||||
<span class="sr-only">40% Complete (success)</span>
|
||||
@ -3428,7 +3432,7 @@
|
||||
|
||||
<h3 id="progress-animated">Animated</h3>
|
||||
<p>Add <code>.active</code> to <code>.progress-bar-striped</code> to animate the stripes right to left. Not available in IE9 and below.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="animated-progress-bar">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"><span class="sr-only">45% Complete</span></div>
|
||||
</div>
|
||||
@ -3442,7 +3446,7 @@
|
||||
|
||||
<h3 id="progress-stacked">Stacked</h3>
|
||||
<p>Place multiple bars into the same <code>.progress</code> to stack them.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="stacked-progress-bar">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: 35%">
|
||||
<span class="sr-only">35% Complete (success)</span>
|
||||
@ -3475,7 +3479,7 @@
|
||||
|
||||
<h3 id="media-default">Default media</h3>
|
||||
<p>The default media displays a media object (images, video, audio) to the left or right of a content block.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="default-media">
|
||||
<div class="media">
|
||||
<a class="media-left" href="#">
|
||||
<img data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
@ -3538,7 +3542,7 @@
|
||||
<p>The classes <code>.pull-left</code> and <code>.pull-right</code> also exist and were previously used as part of the media component, but are deprecated for that use as of v3.3.0. They are approximately equivalent to <code>.media-left</code> and <code>.media-right</code>, except that <code>.media-right</code> should be placed after the <code>.media-body</code> in the html.</p>
|
||||
<h3 id="media-alignment">Media alignment</h3>
|
||||
<p>The images or other media can be aligned top, middle, or bottom. The default is top aligned.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="media-alignment">
|
||||
<div class="media">
|
||||
<a class="media-left" href="#">
|
||||
<img data-src="holder.js/64x64" alt="Generic placeholder image">
|
||||
@ -3582,7 +3586,7 @@
|
||||
|
||||
<h3 id="media-list">Media list</h3>
|
||||
<p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="media-list">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<a class="media-left" href="#">
|
||||
@ -3645,7 +3649,7 @@
|
||||
|
||||
<h3 id="list-group-basic">Basic example</h3>
|
||||
<p>The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-list-group">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
@ -3664,7 +3668,7 @@
|
||||
|
||||
<h3 id="list-group-badges">Badges</h3>
|
||||
<p>Add the badges component to any list group item and it will automatically be positioned on the right.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="list-group-badges">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<span class="badge">14</span>
|
||||
@ -3689,7 +3693,7 @@
|
||||
|
||||
<h3 id="list-group-linked">Linked items</h3>
|
||||
<p>Linkify list group items by using anchor tags instead of list items (that also means a parent <code><div></code> instead of an <code><ul></code>). No need for individual parents around each element.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="list-group-anchors">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
Cras justo odio
|
||||
@ -3712,7 +3716,7 @@
|
||||
|
||||
<h3 id="list-group-disabled">Disabled items</h3>
|
||||
<p>Add <code>.disabled</code> to a <code>.list-group-item</code> to gray it out to appear disabled.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="list-group-disabled">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item disabled">
|
||||
Cras justo odio
|
||||
@ -3735,7 +3739,7 @@
|
||||
|
||||
<h3 id="list-group-contextual-classes">Contextual classes</h3>
|
||||
<p>Use contextual classes to style list items, default or linked. Also includes <code>.active</code> state.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="list-group-variants">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<ul class="list-group">
|
||||
@ -3770,7 +3774,7 @@
|
||||
|
||||
<h3 id="list-group-custom-content">Custom content</h3>
|
||||
<p>Add nearly any HTML within, even for linked list groups like the one below.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="list-group-custom-content">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item active">
|
||||
<h4 class="list-group-item-heading">List group item heading</h4>
|
||||
@ -3801,7 +3805,7 @@
|
||||
|
||||
<h3 id="panels-basic">Basic example</h3>
|
||||
<p>By default, all the <code>.panel</code> does is apply some basic border and padding to contain some content.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-panel">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
Basic panel example
|
||||
@ -3817,7 +3821,7 @@
|
||||
<h3 id="panels-heading">Panel with heading</h3>
|
||||
<p>Easily add a heading container to your panel with <code>.panel-heading</code>. You may also include any <code><h1></code>-<code><h6></code> with a <code>.panel-title</code> class to add a pre-styled heading.</p>
|
||||
<p>For proper link coloring, be sure to place links in headings within <code>.panel-title</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="panel-with-heading">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Panel heading without title</div>
|
||||
<div class="panel-body">
|
||||
@ -3851,7 +3855,7 @@
|
||||
|
||||
<h3 id="panels-footer">Panel with footer</h3>
|
||||
<p>Wrap buttons or secondary text in <code>.panel-footer</code>. Note that panel footers <strong>do not</strong> inherit colors and borders when using contextual variations as they are not meant to be in the foreground.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="panel-with-footer">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
@ -3868,7 +3872,7 @@
|
||||
|
||||
<h3 id="panels-alternatives">Contextual alternatives</h3>
|
||||
<p>Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="contextual-panels">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
@ -3918,7 +3922,7 @@
|
||||
|
||||
<h3 id="panels-tables">With tables</h3>
|
||||
<p>Add any non-bordered <code>.table</code> within a panel for a seamless design. If there is a <code>.panel-body</code>, we add an extra border to the top of the table for separation.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="table-within-panel">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
@ -3973,7 +3977,7 @@
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<p>If there is no panel body, the component moves from panel header to table without interruption.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="panel-without-body-with-table">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
@ -4024,7 +4028,7 @@
|
||||
|
||||
<h3 id="panels-list-group">With list groups</h3>
|
||||
<p>Easily include full-width <a href="#list-group">list groups</a> within any panel.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="panel-with-list-group">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">Panel heading</div>
|
||||
@ -4066,7 +4070,7 @@
|
||||
<p>Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.</p>
|
||||
<p>Rules are directly applied to <code><iframe></code>, <code><embed></code>, <code><video></code>, and <code><object></code> elements; optionally use an explicit descendant class <code>.embed-responsive-item</code> when you want to match the styling for other attributes.</p>
|
||||
<p><strong>Pro-Tip!</strong> You don't need to include <code>frameborder="0"</code> in your <code><iframe></code>s as we override that for you.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="responsive-embed-16by9-iframe-youtube">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
|
||||
</div>
|
||||
@ -4087,7 +4091,7 @@
|
||||
|
||||
<h3>Default well</h3>
|
||||
<p>Use the well as a simple effect on an element to give it an inset effect.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="default-well">
|
||||
<div class="well">
|
||||
Look, I'm in a well!
|
||||
</div>
|
||||
@ -4095,14 +4099,14 @@
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><div</span> <span class="na">class=</span><span class="s">"well"</span><span class="nt">></span>...<span class="nt"></div></span></code></pre></div>
|
||||
<h3>Optional classes</h3>
|
||||
<p>Control padding and rounded corners with two optional modifier classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="large-well">
|
||||
<div class="well well-lg">
|
||||
Look, I'm in a large well!
|
||||
</div>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><div</span> <span class="na">class=</span><span class="s">"well well-lg"</span><span class="nt">></span>...<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="small-well">
|
||||
<div class="well well-sm">
|
||||
Look, I'm in a small well!
|
||||
</div>
|
||||
@ -4113,8 +4117,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="bs-docs-sidebar hidden-print hidden-xs hidden-sm" role="complementary">
|
||||
<div class="col-md-3" role="complementary">
|
||||
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav bs-docs-sidenav">
|
||||
|
||||
<li>
|
||||
@ -4272,7 +4276,7 @@
|
||||
Preview theme
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -4303,7 +4307,7 @@
|
||||
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>.</p>
|
||||
<p>Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<ul class="bs-docs-footer-links muted">
|
||||
<ul class="bs-docs-footer-links text-muted">
|
||||
<li>Currently v3.3.1</li>
|
||||
<li>·</li>
|
||||
<li><a href="https://github.com/twbs/bootstrap">GitHub</a></li>
|
||||
|
279
css/index.html
279
css/index.html
@ -68,7 +68,7 @@
|
||||
</button>
|
||||
<a href="../" class="navbar-brand">Bootstrap</a>
|
||||
</div>
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../getting-started/">Getting started</a>
|
||||
@ -168,7 +168,7 @@
|
||||
<li>The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content.</li>
|
||||
<li>Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three <code>.col-xs-4</code>.</li>
|
||||
<li>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</li>
|
||||
<li>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any <code>.col-md-</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-</code> class is not present.</li>
|
||||
<li>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, e.g. applying any <code>.col-md-*</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-*</code> class is not present.</li>
|
||||
</ul>
|
||||
<p>Look to the examples for applying these principles to your code.</p>
|
||||
|
||||
@ -218,49 +218,49 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="text-nowrap">Grid behavior</th>
|
||||
<th class="text-nowrap" scope="row">Grid behavior</th>
|
||||
<td>Horizontal at all times</td>
|
||||
<td colspan="3">Collapsed to start, horizontal above breakpoints</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Container width</th>
|
||||
<th class="text-nowrap" scope="row">Container width</th>
|
||||
<td>None (auto)</td>
|
||||
<td>750px</td>
|
||||
<td>970px</td>
|
||||
<td>1170px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Class prefix</th>
|
||||
<th class="text-nowrap" scope="row">Class prefix</th>
|
||||
<td><code>.col-xs-</code></td>
|
||||
<td><code>.col-sm-</code></td>
|
||||
<td><code>.col-md-</code></td>
|
||||
<td><code>.col-lg-</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap"># of columns</th>
|
||||
<th class="text-nowrap" scope="row"># of columns</th>
|
||||
<td colspan="4">12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Column width</th>
|
||||
<th class="text-nowrap" scope="row">Column width</th>
|
||||
<td class="text-muted">Auto</td>
|
||||
<td>~62px</td>
|
||||
<td>~81px</td>
|
||||
<td>~97px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Gutter width</th>
|
||||
<th class="text-nowrap" scope="row">Gutter width</th>
|
||||
<td colspan="4">30px (15px on each side of a column)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Nestable</th>
|
||||
<th class="text-nowrap" scope="row">Nestable</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Offsets</th>
|
||||
<th class="text-nowrap" scope="row">Offsets</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-nowrap">Column ordering</th>
|
||||
<th class="text-nowrap" scope="row">Column ordering</th>
|
||||
<td colspan="4">Yes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -688,7 +688,7 @@
|
||||
<!-- Headings -->
|
||||
<h2 id="type-headings">Headings</h2>
|
||||
<p>All HTML headings, <code><h1></code> through <code><h6></code>, are available. <code>.h1</code> through <code>.h6</code> classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.</p>
|
||||
<div class="bs-example bs-example-type">
|
||||
<div class="bs-example bs-example-type" data-example-id="simple-headings">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -726,7 +726,7 @@
|
||||
<span class="nt"><h6></span>h6. Bootstrap heading<span class="nt"></h6></span></code></pre></div>
|
||||
|
||||
<p>Create lighter, secondary text in any heading with a generic <code><small></code> tag or the <code>.small</code> class.</p>
|
||||
<div class="bs-example bs-example-type">
|
||||
<div class="bs-example bs-example-type" data-example-id="small-headings">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -761,7 +761,7 @@
|
||||
<!-- Body copy -->
|
||||
<h2 id="type-body-copy">Body copy</h2>
|
||||
<p>Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>1.428</strong>. This is applied to the <code><body></code> and all paragraphs. In addition, <code><p></code> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="body-copy">
|
||||
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p>
|
||||
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
|
||||
@ -771,7 +771,7 @@
|
||||
<!-- Body copy .lead -->
|
||||
<h3>Lead body copy</h3>
|
||||
<p>Make a paragraph stand out by adding <code>.lead</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="lead-copy">
|
||||
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><p</span> <span class="na">class=</span><span class="s">"lead"</span><span class="nt">></span>...<span class="nt"></p></span></code></pre></div>
|
||||
@ -784,7 +784,7 @@
|
||||
<h2 id="type-inline-text">Inline text elements</h2>
|
||||
<h3>Marked text</h3>
|
||||
<p>For highlighting a run of text due to its relevance in another context, use the <code><mark></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-mark">
|
||||
<p>You can use the mark tag to <mark>highlight</mark> text.</p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html">You can use the mark tag to <span class="nt"><mark></span>highlight<span class="nt"></mark></span> text.</code></pre></div>
|
||||
@ -792,28 +792,28 @@
|
||||
|
||||
<h3>Deleted text</h3>
|
||||
<p>For indicating blocks of text that have been deleted use the <code><del></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-del">
|
||||
<p><del>This line of text is meant to be treated as deleted text.</del></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><del></span>This line of text is meant to be treated as deleted text.<span class="nt"></del></span></code></pre></div>
|
||||
|
||||
<h3>Strikethrough text</h3>
|
||||
<p>For indicating blocks of text that are no longer relevant use the <code><s></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-s">
|
||||
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><s></span>This line of text is meant to be treated as no longer accurate.<span class="nt"></s></span></code></pre></div>
|
||||
|
||||
<h3>Inserted text</h3>
|
||||
<p>For indicating additions to the document use the <code><ins></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-ins">
|
||||
<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><ins></span>This line of text is meant to be treated as an addition to the document.<span class="nt"></ins></span></code></pre></div>
|
||||
|
||||
<h3>Underlined text</h3>
|
||||
<p>To underline text use the <code><u></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-u">
|
||||
<p><u>This line of text will render as underlined</u></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><u></span>This line of text will render as underlined<span class="nt"></u></span></code></pre></div>
|
||||
@ -823,7 +823,7 @@
|
||||
<h3>Small text</h3>
|
||||
<p>For de-emphasizing inline or blocks of text, use the <code><small></code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code><small></code> elements.</p>
|
||||
<p>You may alternatively use an inline element with <code>.small</code> in place of any <code><small></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-small">
|
||||
<p><small>This line of text is meant to be treated as fine print.</small></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><small></span>This line of text is meant to be treated as fine print.<span class="nt"></small></span></code></pre></div>
|
||||
@ -831,26 +831,26 @@
|
||||
|
||||
<h3>Bold</h3>
|
||||
<p>For emphasizing a snippet of text with a heavier font-weight.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-strong">
|
||||
<p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><strong></span>rendered as bold text<span class="nt"></strong></span></code></pre></div>
|
||||
|
||||
<h3>Italics</h3>
|
||||
<p>For emphasizing a snippet of text with italics.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-em">
|
||||
<p>The following snippet of text is <em>rendered as italicized text</em>.</p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><em></span>rendered as italicized text<span class="nt"></em></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-type-b-i-elems">
|
||||
<h4>Alternate elements</h4>
|
||||
<p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="type-alignment">Alignment classes</h2>
|
||||
<p>Easily realign text to components with text alignment classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="text-alignment">
|
||||
<p class="text-left">Left aligned text.</p>
|
||||
<p class="text-center">Center aligned text.</p>
|
||||
<p class="text-right">Right aligned text.</p>
|
||||
@ -865,7 +865,7 @@
|
||||
|
||||
<h2 id="type-transformation">Transformation classes</h2>
|
||||
<p>Transform text in components with text capitalization classes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="text-capitalization">
|
||||
<p class="text-lowercase">Lowercased text.</p>
|
||||
<p class="text-uppercase">Uppercased text.</p>
|
||||
<p class="text-capitalize">Capitalized text.</p>
|
||||
@ -876,18 +876,17 @@
|
||||
|
||||
<!-- Abbreviations -->
|
||||
<h2 id="type-abbreviations">Abbreviations</h2>
|
||||
<p>Stylized implementation of HTML's <code><abbr></code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.</p>
|
||||
<p>Stylized implementation of HTML's <code><abbr></code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover and to users of assistive technologies.</p>
|
||||
|
||||
<h3>Basic abbreviation</h3>
|
||||
<p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute with the <code><abbr></code> element.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-abbr">
|
||||
<p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"attribute"</span><span class="nt">></span>attr<span class="nt"></abbr></span></code></pre></div>
|
||||
|
||||
<h3>Initialism</h3>
|
||||
<p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-initialism">
|
||||
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><abbr</span> <span class="na">title=</span><span class="s">"HyperText Markup Language"</span> <span class="na">class=</span><span class="s">"initialism"</span><span class="nt">></span>HTML<span class="nt"></abbr></span></code></pre></div>
|
||||
@ -896,7 +895,7 @@
|
||||
<!-- Addresses -->
|
||||
<h2 id="type-addresses">Addresses</h2>
|
||||
<p>Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <code><br></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-address">
|
||||
<address>
|
||||
<strong>Twitter, Inc.</strong><br>
|
||||
795 Folsom Ave, Suite 600<br>
|
||||
@ -927,7 +926,7 @@
|
||||
|
||||
<h3>Default blockquote</h3>
|
||||
<p>Wrap <code><blockquote></code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code><p></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-blockquote">
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
</blockquote>
|
||||
@ -941,7 +940,7 @@
|
||||
|
||||
<h4>Naming a source</h4>
|
||||
<p>Add a <code><footer></code> for identifying the source. Wrap the name of the source work in <code><cite></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="blockquote-cite">
|
||||
<blockquote>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
@ -954,7 +953,7 @@
|
||||
|
||||
<h4>Alternate displays</h4>
|
||||
<p>Add <code>.blockquote-reverse</code> for a blockquote with right-aligned content.</p>
|
||||
<div class="bs-example" style="overflow: hidden;">
|
||||
<div class="bs-example" style="overflow: hidden;" data-example-id="blockquote-reverse">
|
||||
<blockquote class="blockquote-reverse">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
@ -970,7 +969,7 @@
|
||||
|
||||
<h3>Unordered</h3>
|
||||
<p>A list of items in which the order does <em>not</em> explicitly matter.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-ul">
|
||||
<ul>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
@ -995,7 +994,7 @@
|
||||
|
||||
<h3>Ordered</h3>
|
||||
<p>A list of items in which the order <em>does</em> explicitly matter.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-ol">
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
@ -1013,7 +1012,7 @@
|
||||
|
||||
<h3>Unstyled</h3>
|
||||
<p>Remove the default <code>list-style</code> and left margin on list items (immediate children only). <strong>This only applies to immediate children list items</strong>, meaning you will need to add the class for any nested lists as well.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="unstyled-list">
|
||||
<ul class="list-unstyled">
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
@ -1038,7 +1037,7 @@
|
||||
|
||||
<h3>Inline</h3>
|
||||
<p>Place all list items on a single line with <code>display: inline-block;</code> and some light padding.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="list-inline">
|
||||
<ul class="list-inline">
|
||||
<li>Lorem ipsum</li>
|
||||
<li>Phasellus iaculis</li>
|
||||
@ -1051,7 +1050,7 @@
|
||||
|
||||
<h3>Description</h3>
|
||||
<p>A list of terms with their associated descriptions.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-dl">
|
||||
<dl>
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description list is perfect for defining terms.</dd>
|
||||
@ -1069,7 +1068,7 @@
|
||||
|
||||
<h4>Horizontal description</h4>
|
||||
<p>Make terms and descriptions in <code><dl></code> line up side-by-side. Starts off stacked like default <code><dl></code>s, but when the navbar expands, so do these.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="horizontal-dl">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Description lists</dt>
|
||||
<dd>A description list is perfect for defining terms.</dd>
|
||||
@ -1087,7 +1086,7 @@
|
||||
<span class="nt"><dd></span>...<span class="nt"></dd></span>
|
||||
<span class="nt"></dl></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-type-dl-truncate">
|
||||
<h4>Auto-truncating</h4>
|
||||
<p>Horizontal description lists will truncate terms that are too long to fit in the left column with <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.</p>
|
||||
</div>
|
||||
@ -1098,14 +1097,14 @@
|
||||
|
||||
<h2 id="code-inline">Inline</h2>
|
||||
<p>Wrap inline snippets of code with <code><code></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="inline-code">
|
||||
For example, <code><section></code> should be wrapped as inline.
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html">For example, <span class="nt"><code></span><span class="ni">&lt;</span>section<span class="ni">&gt;</span><span class="nt"></code></span> should be wrapped as inline.</code></pre></div>
|
||||
|
||||
<h2 id="code-user-input">User input</h2>
|
||||
<p>Use the <code><kbd></code> to indicate input that is typically entered via keyboard.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-kbd">
|
||||
To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
|
||||
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>
|
||||
</div>
|
||||
@ -1114,7 +1113,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="code-block">Basic block</h2>
|
||||
<p>Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-pre">
|
||||
<pre><p>Sample text here...</p></pre>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><pre></span><span class="ni">&lt;</span>p<span class="ni">&gt;</span>Sample text here...<span class="ni">&lt;</span>/p<span class="ni">&gt;</span><span class="nt"></pre></span></code></pre></div>
|
||||
@ -1122,7 +1121,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<p>You may optionally add the <code>.pre-scrollable</code> class, which will set a max-height of 350px and provide a y-axis scrollbar.</p>
|
||||
<h2 id="code-variables">Variables</h2>
|
||||
<p>For indicating variables use the <code><var></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-var">
|
||||
<p><var>y</var> = <var>m</var><var>x</var> + <var>b</var></p>
|
||||
|
||||
</div>
|
||||
@ -1130,7 +1129,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="code-sample-output">Sample output</h2>
|
||||
<p>For indicating blocks sample output from a program use the <code><samp></code> tag.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-samp">
|
||||
<p><samp>This text is meant to be treated as sample output from a computer program.</samp></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><samp></span>This text is meant to be treated as sample output from a computer program.<span class="nt"></samp></span></code></pre></div>
|
||||
@ -1141,7 +1140,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="tables-example">Basic example</h2>
|
||||
<p>For basic styling—light padding and only horizontal dividers—add the base class <code>.table</code> to any <code><table></code>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-table">
|
||||
<table class="table">
|
||||
<caption>Optional table caption.</caption>
|
||||
<thead>
|
||||
@ -1181,11 +1180,11 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="tables-striped">Striped rows</h2>
|
||||
<p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code><tbody></code>.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-tables-striped-ie8">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in Internet Explorer 8.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="striped-table">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1224,7 +1223,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="tables-bordered">Bordered table</h2>
|
||||
<p>Add <code>.table-bordered</code> for borders on all sides of the table and cells.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="bordered-table">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1267,7 +1266,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="tables-hover-rows">Hover rows</h2>
|
||||
<p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code><tbody></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="hoverable-table">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1305,7 +1304,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="tables-condensed">Condensed table</h2>
|
||||
<p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="condensed-table">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1389,7 +1388,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="contextual-table">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1472,7 +1471,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"><td</span> <span class="na">class=</span><span class="s">"danger"</span><span class="nt">></span>...<span class="nt"></td></span>
|
||||
<span class="nt"><td</span> <span class="na">class=</span><span class="s">"info"</span><span class="nt">></span>...<span class="nt"></td></span>
|
||||
<span class="nt"></tr></span></code></pre></div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tables-context-accessibility">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>Using color to add meaning to a table row or individual cell only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text in the relevant table row/cell), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
@ -1480,7 +1479,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<h2 id="tables-responsive">Responsive tables</h2>
|
||||
<p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tables-responsive-ff-fieldset">
|
||||
<h4>Firefox and fieldsets</h4>
|
||||
<p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p>
|
||||
<div class="highlight"><pre><code class="language-css" data-lang="css"><span class="k">@-moz-document</span> <span class="n">url-prefix</span><span class="p">()</span> <span class="p">{</span>
|
||||
@ -1489,7 +1488,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<p>For more information, read <a href="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-responsive-table">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
@ -1592,7 +1591,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-example">Basic example</h2>
|
||||
<p>Individual form controls automatically receive some global styling. All textual <code><input></code>, <code><textarea></code>, and <code><select></code> elements with <code>.form-control</code> are set to <code>width: 100%;</code> by default. Wrap labels and controls in <code>.form-group</code> for optimum spacing.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="basic-forms">
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email address</label>
|
||||
@ -1636,7 +1635,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"submit"</span> <span class="na">class=</span><span class="s">"btn btn-default"</span><span class="nt">></span>Submit<span class="nt"></button></span>
|
||||
<span class="nt"></form></span></code></pre></div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-formgroup-inputgroup">
|
||||
<h4>Don't mix form groups with input groups</h4>
|
||||
<p>Do not mix form groups directly with <a href="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
|
||||
</div>
|
||||
@ -1644,15 +1643,15 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-inline">Inline form</h2>
|
||||
<p>Add <code>.form-inline</code> to your <code><form></code> for left-aligned and inline-block controls. <strong>This only applies to forms within viewports that are at least 768px wide.</strong></p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-inline-form-width">
|
||||
<h4>Requires custom widths</h4>
|
||||
<p>Inputs and selects have <code>width: 100%;</code> applied by default in Bootstrap. Within inline forms, we reset that to <code>width: auto;</code> so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-inline-form-labels">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the <code>.sr-only</code> class. There are further alternative methods of providing a label for assistive technologies, such as the <code>aria-label</code>, <code>aria-labelledby</code> or <code>title</code> attribute. If none of these is present, screen readers may resort to using the <code>placeholder</code> attribute, if present, but note that use of <code>placeholder</code> as a replacement for other labelling methods is not advised.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-form-inline">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="exampleInputEmail2">Email address</label>
|
||||
@ -1699,7 +1698,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-horizontal">Horizontal form</h2>
|
||||
<p>Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding <code>.form-horizontal</code> to the form. Doing so changes <code>.form-group</code>s to behave as grid rows, so no need for <code>.row</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-horizontal-form">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
|
||||
@ -1764,24 +1763,24 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Inputs</h3>
|
||||
<p>Most common form control, text-based input fields. Includes support for all HTML5 types: <code>text</code>, <code>password</code>, <code>datetime</code>, <code>datetime-local</code>, <code>date</code>, <code>month</code>, <code>time</code>, <code>week</code>, <code>number</code>, <code>email</code>, <code>url</code>, <code>search</code>, <code>tel</code>, and <code>color</code>.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-input-needs-type">
|
||||
<h4>Type declaration required</h4>
|
||||
<p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="text-form-control">
|
||||
<form role="form">
|
||||
<input type="text" class="form-control" placeholder="Text input">
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">class=</span><span class="s">"form-control"</span> <span class="na">placeholder=</span><span class="s">"Text input"</span><span class="nt">></span></code></pre></div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-xref-input-group">
|
||||
<h4>Input groups</h4>
|
||||
<p>To add integrated text or buttons before and/or after any text-based <code><input></code>, <a href="../components/#input-groups">check out the input group component</a>.</p>
|
||||
</div>
|
||||
|
||||
<h3>Textarea</h3>
|
||||
<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="textarea-form-control">
|
||||
<form role="form">
|
||||
<textarea class="form-control" rows="3" placeholder="Textarea"></textarea>
|
||||
</form>
|
||||
@ -1792,7 +1791,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<p>Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.</p>
|
||||
<p>A checkbox or radio with the <code>disabled</code> attribute will be styled appropriately. To have the <code><label></code> for the checkbox or radio also display a "not-allowed" cursor when the user hovers over the label, add the <code>.disabled</code> class to your <code>.radio</code>, <code>.radio-inline</code>, <code>.checkbox</code>, <code>.checkbox-inline</code>, or <code><fieldset></code>.</p>
|
||||
<h4>Default (stacked)</h4>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="block-checkboxes-radios">
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
@ -1861,7 +1860,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h4>Inline checkboxes and radios</h4>
|
||||
<p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of checkboxes or radios for controls that appear on the same line.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="inline-checkboxes-radios">
|
||||
<form role="form">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
|
||||
@ -1908,7 +1907,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h4>Checkboxes and radios without label text</h4>
|
||||
<p>Should you have no text within the <code><label></code>, the input is positioned as you'd expect. <strong>Currently only works on non-inline checkboxes and radios.</strong> Remember to still provide some form of label for assistive technologies (for instance, using <code>aria-label</code>).</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="checkboxes-radios-without-labels">
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
@ -1934,8 +1933,8 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<h3>Selects</h3>
|
||||
<p>Use the default option, or add <code>multiple</code> to show multiple options at once.</p>
|
||||
<div class="bs-example">
|
||||
<p>Note that many native select menus—namely in Safari and Chrome—have rounded corners that cannot be modified via <code>border-radius</code> properties.</p>
|
||||
<div class="bs-example" data-example-ids="select-form-control">
|
||||
<form role="form">
|
||||
<select class="form-control">
|
||||
<option>1</option>
|
||||
@ -1973,7 +1972,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-controls-static">Static control</h2>
|
||||
<p>When you need to place plain text next to a form label within a form, use the <code>.form-control-static</code> class on a <code><p></code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="horizontal-static-form-control">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Email</label>
|
||||
@ -2003,7 +2002,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></form></span></code></pre></div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="inline-static-form-control">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group">
|
||||
<label class="sr-only">Email</label>
|
||||
@ -2035,7 +2034,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<input class="form-control" id="focusedInput" type="text" value="Demonstrative focus state">
|
||||
</form>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-focus-demo">
|
||||
<h4>Demo <code>:focus</code> state</h4>
|
||||
<p>The above example input uses custom styles in our documentation to demonstrate the <code>:focus</code> state on a <code>.form-control</code>.</p>
|
||||
</div>
|
||||
@ -2043,7 +2042,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-control-disabled">Disabled state</h2>
|
||||
<p>Add the <code>disabled</code> boolean attribute on an input to prevent user input and trigger a slightly different look.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="text-form-control-disabled">
|
||||
<form role="form">
|
||||
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
|
||||
</form>
|
||||
@ -2053,17 +2052,17 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
|
||||
<p>Add the <code>disabled</code> attribute to a <code><fieldset></code> to disable all the controls within the <code><fieldset></code> at once.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-fieldset-disabled-pointer-events">
|
||||
<h4>Caveat about link functionality of <code><a></code></h4>
|
||||
<p>Our styles use <code>pointer-events: none</code> to try to disable the link functionality of <code><a class="btn btn-*"></code> buttons in this case, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
<p>By default, browsers will treat all native form controls (<code><input></code>, <code><select></code> and <code><button></code> elements) inside a <code><fieldset disabled></code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code><a ... class="btn btn-*"></code> elements, these will only be given a style of <code>pointer-events: none</code>. As noted in the section about <a href="#buttons-disabled">disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-fieldset-disabled-ie">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="disabled-fieldset">
|
||||
<form role="form">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
@ -2109,7 +2108,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-control-readonly">Readonly state</h2>
|
||||
<p>Add the <code>readonly</code> boolean attribute on an input to prevent user input and style the input as disabled.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="readonly-text-form-control">
|
||||
<form role="form">
|
||||
<input class="form-control" type="text" placeholder="Readonly input here…" readonly>
|
||||
</form>
|
||||
@ -2120,13 +2119,13 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<h2 id="forms-control-validation">Validation states</h2>
|
||||
<p>Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element. Any <code>.control-label</code>, <code>.form-control</code>, and <code>.help-block</code> within that element will receive the validation styles.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-form-validation-state-accessibility">
|
||||
<h4>Conveying validation state to assistive technologies</h4>
|
||||
<p>Using these validation styles to denote the state of a form control only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers.</p>
|
||||
<p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code><label></code> text itself (as is the case in the following code example), or associate an additional element with textual information about the validation state with the form control using <code>aria-describedby</code> (see the example in the following section). In the case of an error, you could also use the <code>aria-invalid="true"</code> attribute on the form control.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="form-validation-states">
|
||||
<form role="form">
|
||||
<div class="form-group has-success">
|
||||
<label class="control-label" for="inputSuccess1">Input with success</label>
|
||||
@ -2206,16 +2205,16 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<h3>With optional icons</h3>
|
||||
<p>You can also add optional feedback icons with the addition of <code>.has-feedback</code> and the right icon.</p>
|
||||
<p><strong class="text-danger">Feedback icons only work with textual <code><input class="form-control"></code> elements.</strong></p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-has-feedback-icon-positioning">
|
||||
<h4>Icons, labels, and input groups</h4>
|
||||
<p>Manual positioning of feedback icons is required for inputs without a label and for <a href="../components#input-groups">input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the <code>.sr-only</code> class. If you must do without labels, adjust the <code>top</code> value of the feedback icon. For input groups, adjust the <code>right</code> value to an appropriate pixel value depending on the width of your addon.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-has-feedback-icon-accessibility">
|
||||
<h4>Conveying the icon's meaning to assistive technologies</h4>
|
||||
<p>To ensure that assistive technologies – such as screen readers – correctly convey the meaning of an icon, additional hidden text should be included with the <code>.sr-only</code> class and explicitly associated with the form control it relates to using <code>aria-describedby</code>. Alternatively, ensure that the meaning (for instance, the fact that there is a warning for a particular text entry field) is conveyed in some other form, such as changing the text of the actual <code><label></code> associated with the form control.</p>
|
||||
<p>Although the following examples already mention the validation state of their respective form controls in the <code><label></code> text itself, the above technique (using <code>.sr-only</code> text and <code>aria-describedby</code>) has been included for illustrative purposes.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="form-validation-states-with-icons">
|
||||
<form role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess2">Input with success</label>
|
||||
@ -2257,7 +2256,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<h4>Optional icons in horizontal and inline forms</h4>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="horizontal-form-validation-state-with-icon">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label col-sm-3" for="inputSuccess3">Input with success</label>
|
||||
@ -2280,7 +2279,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></form></span></code></pre></div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="inline-form-validation-state-with-icon">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label" for="inputSuccess4">Input with success</label>
|
||||
@ -2300,8 +2299,8 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></form></span></code></pre></div>
|
||||
|
||||
<h4>Optional icons with hidden <code>.sr-only</code> labels</h4>
|
||||
<p>For form controls with no visible label, add the <code>.sr-only</code> class on the label. Bootstrap will automatically adjust the position of the icon once it's been added.</p>
|
||||
<div class="bs-example">
|
||||
<p>If you use the <code>.sr-only</code> class to hide a form control's <code><label></code> (rather than using other labelling options, such as the <code>aria-label</code> attribute), Bootstrap will automatically adjust the position of the icon once it's been added.</p>
|
||||
<div class="bs-example" data-example-id="form-validation-state-with-icon-without-label">
|
||||
<div class="form-group has-success has-feedback">
|
||||
<label class="control-label sr-only" for="inputSuccess5">Hidden label</label>
|
||||
<input type="text" class="form-control" id="inputSuccess5" aria-describedby="inputSuccess5Status">
|
||||
@ -2322,7 +2321,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Height sizing</h3>
|
||||
<p>Create taller or shorter form controls that match button sizes.</p>
|
||||
<div class="bs-example bs-example-control-sizing">
|
||||
<div class="bs-example bs-example-control-sizing" data-example-id="form-control-height-sizes">
|
||||
<form role="form">
|
||||
<div class="controls">
|
||||
<input class="form-control input-lg" type="text" placeholder=".input-lg">
|
||||
@ -2351,7 +2350,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Horizontal form group sizes</h3>
|
||||
<p>Quickly size labels and form controls within <code>.form-horizontal</code> by adding <code>.form-group-lg</code> or <code>.form-group-sm</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="form-group-height-sizes">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group form-group-lg">
|
||||
<label class="col-sm-2 control-label" for="formGroupInputLarge">Large label</label>
|
||||
@ -2385,7 +2384,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Column sizing</h3>
|
||||
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="form-control-column-sizing">
|
||||
<form role="form">
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
@ -2414,11 +2413,11 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="forms-help-text">Help text</h2>
|
||||
<p>Block level help text for form controls.</p>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-help-text-accessibility">
|
||||
<h4>Associating help text with form controls</h4>
|
||||
<p>Help text should be explicitly associated with the form control it relates to using the <code>aria-describedby</code> attribute. This will ensure that assistive technologies – such as screen readers – will announce this help text when the user focuses or enters the control.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-help-text">
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<label for="inputHelpBlock">Input with help text</label>
|
||||
@ -2438,7 +2437,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="buttons-options">Options</h2>
|
||||
<p>Use any of the available button classes to quickly create a styled button.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="btn-variants">
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
<button type="button" class="btn btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-success">Success</button>
|
||||
@ -2468,14 +2467,14 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="c"><!-- Deemphasize a button by making it look like a link while maintaining button behavior --></span>
|
||||
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"btn btn-link"</span><span class="nt">></span>Link<span class="nt"></button></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-buttons-color-accessibility">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="buttons-sizes">Sizes</h2>
|
||||
<p>Fancy larger or smaller buttons? Add <code>.btn-lg</code>, <code>.btn-sm</code>, or <code>.btn-xs</code> for additional sizes.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="btn-sizes">
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary btn-lg">Large button</button>
|
||||
<button type="button" class="btn btn-default btn-lg">Large button</button>
|
||||
@ -2511,7 +2510,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"></p></span></code></pre></div>
|
||||
|
||||
<p>Create block level buttons—those that span the full width of a parent— by adding <code>.btn-block</code>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="block-btns">
|
||||
<div class="well" style="max-width: 400px; margin: 0 auto 10px;">
|
||||
<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
|
||||
<button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
|
||||
@ -2526,7 +2525,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Button element</h3>
|
||||
<p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p>
|
||||
<p class="bs-example">
|
||||
<p class="bs-example" data-example-id="active-button-btns">
|
||||
<button type="button" class="btn btn-primary btn-lg active">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg active">Button</button>
|
||||
</p>
|
||||
@ -2535,7 +2534,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Anchor element</h3>
|
||||
<p>Add the <code>.active</code> class to <code><a></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<p class="bs-example" data-example-id="active-anchor-btns">
|
||||
<a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg active" role="button">Link</a>
|
||||
</p>
|
||||
@ -2548,21 +2547,21 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3>Button element</h3>
|
||||
<p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<p class="bs-example" data-example-id="disabled-button-btns">
|
||||
<button type="button" class="btn btn-primary btn-lg" disabled="disabled">Primary button</button>
|
||||
<button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
|
||||
</p>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"btn btn-lg btn-primary"</span> <span class="na">disabled=</span><span class="s">"disabled"</span><span class="nt">></span>Primary button<span class="nt"></button></span>
|
||||
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"btn btn-default btn-lg"</span> <span class="na">disabled=</span><span class="s">"disabled"</span><span class="nt">></span>Button<span class="nt"></button></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-buttons-ie-disabled">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>If you add the <code>disabled</code> attribute to a <code><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
|
||||
</div>
|
||||
|
||||
<h3>Anchor element</h3>
|
||||
<p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p>
|
||||
<p class="bs-example">
|
||||
<p class="bs-example" data-example-id="disabled-anchor-btns">
|
||||
<a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
|
||||
<a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
|
||||
</p>
|
||||
@ -2571,7 +2570,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<p>
|
||||
We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
|
||||
</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-buttons-disabled-anchor">
|
||||
<h4>Link functionality caveat</h4>
|
||||
<p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code><a></code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
</div>
|
||||
@ -2611,7 +2610,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="images-responsive">Responsive images</h2>
|
||||
<p>Images in Bootstrap 3 can be made responsive-friendly via the addition of the <code>.img-responsive</code> class. This applies <code>max-width: 100%;</code> and <code>height: auto;</code> to the image so that it scales nicely to the parent element.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-images-ie-svg">
|
||||
<h4>SVG images and IE 8-10</h4>
|
||||
<p>In Internet Explorer 8-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p>
|
||||
</div>
|
||||
@ -2619,11 +2618,11 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h2 id="images-shapes">Image shapes</h2>
|
||||
<p>Add classes to an <code><img></code> element to easily style images in any project.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-images-ie-rounded-corners">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
|
||||
</div>
|
||||
<div class="bs-example bs-example-images">
|
||||
<div class="bs-example bs-example-images" data-example-id="image-shapes">
|
||||
<img data-src="holder.js/140x140" class="img-rounded" alt="A generic square placeholder image with rounded corners">
|
||||
<img data-src="holder.js/140x140" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
|
||||
<img data-src="holder.js/140x140" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
|
||||
@ -2638,7 +2637,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3 id="helper-classes-colors">Contextual colors</h3>
|
||||
<p>Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="contextual-colors-helpers">
|
||||
<p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
|
||||
<p class="text-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
|
||||
@ -2652,18 +2651,18 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"text-info"</span><span class="nt">></span>...<span class="nt"></p></span>
|
||||
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"text-warning"</span><span class="nt">></span>...<span class="nt"></p></span>
|
||||
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"text-danger"</span><span class="nt">></span>...<span class="nt"></p></span></code></pre></div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-helper-context-color-specificity">
|
||||
<h4>Dealing with specificity</h4>
|
||||
<p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-helper-context-color-accessibility">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the contextual colors are only used to reinforce meaning that is already present in the text/markup), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="helper-classes-backgrounds">Contextual backgrounds</h3>
|
||||
<p>Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes.</p>
|
||||
<div class="bs-example bs-example-bg-classes">
|
||||
<div class="bs-example bs-example-bg-classes" data-example-id="contextual-backgrounds-helpers">
|
||||
<p class="bg-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p class="bg-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
|
||||
<p class="bg-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
|
||||
@ -2675,18 +2674,18 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"bg-info"</span><span class="nt">></span>...<span class="nt"></p></span>
|
||||
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"bg-warning"</span><span class="nt">></span>...<span class="nt"></p></span>
|
||||
<span class="nt"><p</span> <span class="na">class=</span><span class="s">"bg-danger"</span><span class="nt">></span>...<span class="nt"></p></span></code></pre></div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-helper-bg-specificity">
|
||||
<h4>Dealing with specificity</h4>
|
||||
<p>Sometimes contextual background classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a <code><div></code> with the class.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-helper-bg-accessibility">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>As with <a href="#helper-classes-colors">contextual colors</a>, ensure that any meaning conveyed through color is also conveyed in a format that is not purely presentational.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="helper-classes-close">Close icon</h3>
|
||||
<p>Use the generic close icon for dismissing content like modals and alerts.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="close-icon">
|
||||
<p><button type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button></p>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"close"</span><span class="nt">><span</span> <span class="na">aria-hidden=</span><span class="s">"true"</span><span class="nt">></span><span class="ni">&times;</span><span class="nt"></span><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>Close<span class="nt"></span></button></span></code></pre></div>
|
||||
@ -2694,7 +2693,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
<h3 id="helper-classes-carets">Carets</h3>
|
||||
<p>Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in <a href="../components/#btn-dropdowns-dropup">dropup menus</a>.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="caret">
|
||||
<span class="caret"></span>
|
||||
</div>
|
||||
<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><span</span> <span class="na">class=</span><span class="s">"caret"</span><span class="nt">></span></span></code></pre></div>
|
||||
@ -2720,7 +2719,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<span class="nc">.pull-right</span><span class="o">()</span><span class="p">;</span>
|
||||
<span class="p">}</span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-helper-pull-navbar">
|
||||
<h4>Not for use in navbars</h4>
|
||||
<p>To align components in navbars with utility classes, use <code>.navbar-left</code> or <code>.navbar-right</code> instead. <a href="../components/#navbar-component-alignment">See the navbar docs</a> for details.</p>
|
||||
</div>
|
||||
@ -2844,28 +2843,28 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.visible-xs-*</code></th>
|
||||
<th scope="row"><code>.visible-xs-*</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-sm-*</code></th>
|
||||
<th scope="row"><code>.visible-sm-*</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-md-*</code></th>
|
||||
<th scope="row"><code>.visible-md-*</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.visible-lg-*</code></th>
|
||||
<th scope="row"><code>.visible-lg-*</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
@ -2874,28 +2873,28 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>.hidden-xs</code></th>
|
||||
<th scope="row"><code>.hidden-xs</code></th>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-sm</code></th>
|
||||
<th scope="row"><code>.hidden-sm</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-md</code></th>
|
||||
<th scope="row"><code>.hidden-md</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-lg</code></th>
|
||||
<th scope="row"><code>.hidden-lg</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-visible">Visible</td>
|
||||
@ -2916,15 +2915,15 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>.visible-*-block</code></td>
|
||||
<th scope="row"><code>.visible-*-block</code></th>
|
||||
<td><code>display: block;</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-*-inline</code></td>
|
||||
<th scope="row"><code>.visible-*-inline</code></th>
|
||||
<td><code>display: inline;</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.visible-*-inline-block</code></td>
|
||||
<th scope="row"><code>.visible-*-inline-block</code></th>
|
||||
<td><code>display: inline-block;</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -2946,7 +2945,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<th scope="row">
|
||||
<code>.visible-print-block</code><br>
|
||||
<code>.visible-print-inline</code><br>
|
||||
<code>.visible-print-inline-block</code>
|
||||
@ -2955,7 +2954,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<td class="is-visible">Visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>.hidden-print</code></th>
|
||||
<th scope="row"><code>.hidden-print</code></th>
|
||||
<td class="is-visible">Visible</td>
|
||||
<td class="is-hidden">Hidden</td>
|
||||
</tr>
|
||||
@ -3419,7 +3418,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<p>Utility mixins are mixins that combine otherwise unrelated CSS properties to achieve a specific goal or task.</p>
|
||||
|
||||
<h3 id="less-mixins-clearfix">Clearfix</h3>
|
||||
<p>Forget adding <code>class="clearfix"</code> to any element and instead add the <code>.clearfix()</code> mixin where appropriate. Uses the <a href="http://nicolasgallagher.com/micro-clearfix-hack/" target="_blank">micro clearfix</a> from <a href="https://twitter.com/necolas" target="_blank">Nicolas Gallager</a>.</p>
|
||||
<p>Forget adding <code>class="clearfix"</code> to any element and instead add the <code>.clearfix()</code> mixin where appropriate. Uses the <a href="http://nicolasgallagher.com/micro-clearfix-hack/" target="_blank">micro clearfix</a> from <a href="https://twitter.com/necolas" target="_blank">Nicolas Gallagher</a>.</p>
|
||||
<div class="highlight"><pre><code class="language-scss" data-lang="scss"><span class="c1">// Mixin
|
||||
</span><span class="nc">.clearfix</span><span class="o">()</span> <span class="p">{</span>
|
||||
<span class="k">&</span><span class="nd">:before</span><span class="o">,</span>
|
||||
@ -3532,27 +3531,27 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><code>lib/</code></th>
|
||||
<th scope="row"><code>lib/</code></th>
|
||||
<td>Ruby gem code (Sass configuration, Rails and Compass integrations)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>tasks/</code></th>
|
||||
<th scope="row"><code>tasks/</code></th>
|
||||
<td>Converter scripts (turning upstream Less to Sass)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>test/</code></th>
|
||||
<th scope="row"><code>test/</code></th>
|
||||
<td>Compilation tests</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>templates/</code></th>
|
||||
<th scope="row"><code>templates/</code></th>
|
||||
<td>Compass package manifest</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>vendor/assets/</code></th>
|
||||
<th scope="row"><code>vendor/assets/</code></th>
|
||||
<td>Sass, JavaScript, and font files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><code>Rakefile</code></th>
|
||||
<th scope="row"><code>Rakefile</code></th>
|
||||
<td>Internal tasks, such as rake and convert</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -3571,8 +3570,8 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="bs-docs-sidebar hidden-print hidden-xs hidden-sm" role="complementary">
|
||||
<div class="col-md-3" role="complementary">
|
||||
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav bs-docs-sidenav">
|
||||
|
||||
<li>
|
||||
@ -3722,7 +3721,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
Preview theme
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3753,7 +3752,7 @@ To edit settings, press <span class="nt"><kbd><kbd></span>ctrl<span
|
||||
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>.</p>
|
||||
<p>Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<ul class="bs-docs-footer-links muted">
|
||||
<ul class="bs-docs-footer-links text-muted">
|
||||
<li>Currently v3.3.1</li>
|
||||
<li>·</li>
|
||||
<li><a href="https://github.com/twbs/bootstrap">GitHub</a></li>
|
||||
|
@ -63,7 +63,7 @@
|
||||
</button>
|
||||
<a href="../" class="navbar-brand">Bootstrap</a>
|
||||
</div>
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../getting-started/">Getting started</a>
|
||||
@ -204,7 +204,7 @@
|
||||
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>.</p>
|
||||
<p>Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<ul class="bs-docs-footer-links muted">
|
||||
<ul class="bs-docs-footer-links text-muted">
|
||||
<li>Currently v3.3.1</li>
|
||||
<li>·</li>
|
||||
<li><a href="https://github.com/twbs/bootstrap">GitHub</a></li>
|
||||
|
@ -68,7 +68,7 @@
|
||||
</button>
|
||||
<a href="../" class="navbar-brand">Bootstrap</a>
|
||||
</div>
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
|
||||
<nav class="collapse navbar-collapse bs-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../getting-started/">Getting started</a>
|
||||
@ -115,17 +115,12 @@
|
||||
<h3 id="js-individual-compiled">Individual or compiled</h3>
|
||||
<p>Plugins can be included individually (using Bootstrap's individual <code>*.js</code> files), or all at once (using <code>bootstrap.js</code> or the minified <code>bootstrap.min.js</code>).</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-overview-not-both">
|
||||
<h4>Using the compiled JavaScript</h4>
|
||||
<p>Both <code>bootstrap.js</code> and <code>bootstrap.min.js</code> contain all plugins in a single file. Include only one.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>Component data attributes</h4>
|
||||
<p>Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a modal. To accomplish this, use a wrapping element.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-overview-dependencies">
|
||||
<h4>Plugin dependencies</h4>
|
||||
<p>Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Also note that all plugins depend on jQuery (this means jQuery must be included <strong>before</strong> the plugin files). <a href="https://github.com/twbs/bootstrap/blob/v3.3.1/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
|
||||
</div>
|
||||
@ -139,6 +134,11 @@
|
||||
<p>Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">off</span><span class="p">(</span><span class="s1">'.alert.data-api'</span><span class="p">)</span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger" id="callout-overview-single-data">
|
||||
<h4>Only one plugin per element via data attributes</h4>
|
||||
<p>Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a modal. To accomplish this, use a wrapping element.</p>
|
||||
</div>
|
||||
|
||||
<h3 id="js-programmatic-api">Programmatic API</h3>
|
||||
<p>We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'.btn.danger'</span><span class="p">).</span><span class="nx">button</span><span class="p">(</span><span class="s1">'toggle'</span><span class="p">).</span><span class="nx">addClass</span><span class="p">(</span><span class="s1">'fat'</span><span class="p">)</span></code></pre></div>
|
||||
@ -197,7 +197,7 @@
|
||||
<h4>Modal markup placement</h4>
|
||||
<p>Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-modal-mobile-caveats">
|
||||
<h4>Mobile device caveats</h4>
|
||||
<p>There are some caveats regarding using modals on mobile devices. <a href="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
|
||||
</div>
|
||||
@ -208,7 +208,7 @@
|
||||
|
||||
<h3>Static example</h3>
|
||||
<p>A rendered modal with header, body, and set of actions in the footer.</p>
|
||||
<div class="bs-example bs-example-modal">
|
||||
<div class="bs-example bs-example-modal" data-example-id="static-modal">
|
||||
<div class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@ -317,13 +317,13 @@
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-modal-accessibility">
|
||||
<h4>Make modals accessible</h4>
|
||||
<p>Be sure to add <code>role="dialog"</code> to <code>.modal</code>, <code>aria-labelledby="myModalLabel"</code> attribute to reference the modal title, and <code>aria-hidden="true"</code> to tell assistive technologies to skip the modal's DOM elements.</p>
|
||||
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-modal-youtube">
|
||||
<h4>Embedding YouTube videos</h4>
|
||||
<p>Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. <a href="http://stackoverflow.com/questions/18622508/bootstrap-3-and-youtube-in-modal">See this helpful Stack Overflow post</a> for more information.</p>
|
||||
</div>
|
||||
@ -479,7 +479,7 @@
|
||||
<p>Call a modal with id <code>myModal</code> with a single line of JavaScript:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'#myModal'</span><span class="p">).</span><span class="nx">modal</span><span class="p">(</span><span class="nx">options</span><span class="p">)</span></code></pre></div>
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="modals-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-backdrop=""</code>.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -524,7 +524,7 @@
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="modals-methods">Methods</h3>
|
||||
|
||||
<h4>.modal(options)</h4>
|
||||
<p>Activates your content as a modal. Accepts an optional options <code>object</code>.</p>
|
||||
@ -544,10 +544,10 @@
|
||||
<p>Manually hides a modal. <strong>Returns to the caller before the modal has actually been hidden</strong> (i.e. before the <code>hidden.bs.modal</code> event occurs).</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'#myModal'</span><span class="p">).</span><span class="nx">modal</span><span class="p">(</span><span class="s1">'hide'</span><span class="p">)</span></code></pre></div>
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="modals-events">Events</h3>
|
||||
<p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -729,22 +729,23 @@
|
||||
<h3>Via JavaScript</h3>
|
||||
<p>Call the dropdowns via JavaScript:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'.dropdown-toggle'</span><span class="p">).</span><span class="nx">dropdown</span><span class="p">()</span></code></pre></div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-dropdowns-data-required">
|
||||
<h4><code>data-toggle="dropdown"</code> still required</h4>
|
||||
<p>Regardless of whether you call your dropdown via JavaScript or instead use the data-api, <code>data-toggle="dropdown"</code> is always required to be present on the dropdown's trigger element.</p>
|
||||
</div>
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="dropdowns-options">Options</h3>
|
||||
<p><em>None</em></p>
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="dropdowns-methods">Methods</h3>
|
||||
<h4>$().dropdown('toggle')</h4>
|
||||
<p>Toggles the dropdown menu of a given navbar or tabbed navigation.</p>
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="dropdowns-events">Events</h3>
|
||||
<p>All dropdown events are fired at the <code>.dropdown-menu</code>'s parent element.</p>
|
||||
<p>All dropdown events have a <code>relatedTarget</code> property, whose value is the toggling anchor element.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -754,19 +755,19 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>show.bs.dropdown</td>
|
||||
<td>This event fires immediately when the show instance method is called. The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
|
||||
<td>This event fires immediately when the show instance method is called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shown.bs.dropdown</td>
|
||||
<td>This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
|
||||
<td>This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide.bs.dropdown</td>
|
||||
<td>This event is fired immediately when the hide instance method has been called. The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
|
||||
<td>This event is fired immediately when the hide instance method has been called.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hidden.bs.dropdown</td>
|
||||
<td>This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
|
||||
<td>This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -781,7 +782,7 @@
|
||||
|
||||
<h2 id="scrollspy-examples">Example in navbar</h2>
|
||||
<p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="embedded-scrollspy">
|
||||
<nav id="navbar-example2" class="navbar navbar-default navbar-static" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@ -829,15 +830,15 @@
|
||||
|
||||
<h2 id="scrollspy-usage">Usage</h2>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-scrollspy-needs-nav">
|
||||
<h4>Requires Bootstrap nav</h4>
|
||||
<p>Scrollspy currently requires the use of a <a href="../components/#nav">Bootstrap nav component</a> for proper highlighting of active links.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-scrollspy-target-ids">
|
||||
<h4>Resolvable ID targets required</h4>
|
||||
<p>Navbar links must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the DOM like <code><div id="home"></div></code>.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-scrollspy-invisible-targets">
|
||||
<h4>Non-<code>:visible</code> target elements ignored</h4>
|
||||
<p>Target elements that are not <a href="http://api.jquery.com/visible-selector/"><code>:visible</code> according to jQuery</a> will be ignored and their corresponding nav items will never be highlighted.</p>
|
||||
</div>
|
||||
@ -865,7 +866,7 @@
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'body'</span><span class="p">).</span><span class="nx">scrollspy</span><span class="p">({</span> <span class="na">target</span><span class="p">:</span> <span class="s1">'.navbar-example'</span> <span class="p">})</span></code></pre></div>
|
||||
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="scrollspy-methods">Methods</h3>
|
||||
<h4>.scrollspy('refresh')</h4>
|
||||
<p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'[data-spy="scroll"]'</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
|
||||
@ -873,7 +874,7 @@
|
||||
<span class="p">})</span></code></pre></div>
|
||||
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="scrollspy-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset=""</code>.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -896,9 +897,9 @@
|
||||
</table>
|
||||
</div><!-- ./bs-table-responsive -->
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="scrollspy-events">Events</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -923,7 +924,7 @@
|
||||
|
||||
<h2 id="tabs-examples">Example tabs</h2>
|
||||
<p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
|
||||
<div class="bs-example bs-example-tabs" role="tabpanel">
|
||||
<div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs">
|
||||
<ul id="myTab" class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#home" id="home-tab" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="true">Home</a></li>
|
||||
<li role="presentation"><a href="#profile" role="tab" id="profile-tab" data-toggle="tab" aria-controls="profile">Profile</a></li>
|
||||
@ -951,7 +952,7 @@
|
||||
</div>
|
||||
</div><!-- /example -->
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-tabs-extends-component">
|
||||
<h4>Extends tabbed navigation</h4>
|
||||
<p>This plugin extends the <a href="../components/#nav-tabs">tabbed navigation component</a> to add tabbable areas.</p>
|
||||
</div>
|
||||
@ -1003,7 +1004,7 @@
|
||||
<span class="nt"><div</span> <span class="na">role=</span><span class="s">"tabpanel"</span> <span class="na">class=</span><span class="s">"tab-pane fade"</span> <span class="na">id=</span><span class="s">"settings"</span><span class="nt">></span>...<span class="nt"></div></span>
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="tabs-methods">Methods</h3>
|
||||
<h4>$().tab</h4>
|
||||
<p>
|
||||
Activates a tab element and content container. Tab should have either a <code>data-target</code> or an <code>href</code> targeting a container node in the DOM.
|
||||
@ -1028,7 +1029,7 @@
|
||||
<span class="p">})</span>
|
||||
<span class="nt"></script></span></code></pre></div>
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="tabs-events">Events</h3>
|
||||
<p>When showing a new tab, the events fire in the following order:</p>
|
||||
<ol>
|
||||
<li><code>hide.bs.tab</code> (on the current active tab)</li>
|
||||
@ -1038,7 +1039,7 @@
|
||||
</ol>
|
||||
<p>If no tab was already active, then the <code>hide.bs.tab</code> and <code>hidden.bs.tab</code> events will not be fired.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -1085,7 +1086,7 @@
|
||||
|
||||
<h3>Static tooltip</h3>
|
||||
<p>Four options are available: top, right, bottom, and left aligned.</p>
|
||||
<div class="bs-example bs-example-tooltip">
|
||||
<div class="bs-example bs-example-tooltip" data-example-id="static-tooltips">
|
||||
<div class="tooltip left" role="tooltip">
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner">
|
||||
@ -1129,7 +1130,7 @@
|
||||
|
||||
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"btn btn-default"</span> <span class="na">data-toggle=</span><span class="s">"tooltip"</span> <span class="na">data-placement=</span><span class="s">"right"</span> <span class="na">title=</span><span class="s">"Tooltip on right"</span><span class="nt">></span>Tooltip on right<span class="nt"></button></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-tooltip-opt-in">
|
||||
<h4>Opt-in functionality</h4>
|
||||
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
|
||||
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
|
||||
@ -1138,15 +1139,15 @@
|
||||
<span class="p">})</span></code></pre></div>
|
||||
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tooltip-groups">
|
||||
<h4>Tooltips in button groups and input groups require special setting</h4>
|
||||
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tooltip-hidden">
|
||||
<h4>Don't try to show tooltips on hidden elements</h4>
|
||||
<p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-tooltip-disabled">
|
||||
<h4>Tooltips on disabled elements require wrapper elements</h4>
|
||||
<p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the tooltip to that <code><div></code> instead.</p>
|
||||
</div>
|
||||
@ -1158,7 +1159,7 @@
|
||||
|
||||
<h3>Markup</h3>
|
||||
<p>The required markup for a tooltip is only a <code>data</code> attribute and <code>title</code> on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to <code>top</code> by the plugin).</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tooltip-multiline">
|
||||
<h4>Multiple-line links</h4>
|
||||
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
|
||||
</div>
|
||||
@ -1173,7 +1174,7 @@
|
||||
<span class="nt"></div></span>
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="tooltips-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -1268,12 +1269,12 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-tooltip-data">
|
||||
<h4>Data attributes for individual tooltips</h4>
|
||||
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
|
||||
</div>
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="tooltips-methods">Methods</h3>
|
||||
|
||||
<h4>$().tooltip(options)</h4>
|
||||
<p>Attaches a tooltip handler to an element collection.</p>
|
||||
@ -1294,9 +1295,9 @@
|
||||
<p>Hides and destroys an element's tooltip.</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'#element'</span><span class="p">).</span><span class="nx">tooltip</span><span class="p">(</span><span class="s1">'destroy'</span><span class="p">)</span></code></pre></div>
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="tooltips-events">Events</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -1334,11 +1335,11 @@
|
||||
<p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p>
|
||||
<p>Popovers whose both title and content are zero-length are never displayed.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-popover-needs-tooltip">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-popover-opt-in">
|
||||
<h4>Opt-in functionality</h4>
|
||||
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
|
||||
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
|
||||
@ -1346,19 +1347,19 @@
|
||||
<span class="nx">$</span><span class="p">(</span><span class="s1">'[data-toggle="popover"]'</span><span class="p">).</span><span class="nx">popover</span><span class="p">()</span>
|
||||
<span class="p">})</span></code></pre></div>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-popover-groups">
|
||||
<h4>Popovers in button groups and input groups require special setting</h4>
|
||||
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-popover-hidden">
|
||||
<h4>Don't try to show popovers on hidden elements</h4>
|
||||
<p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-popover-disabled">
|
||||
<h4>Popovers on disabled elements require wrapper elements</h4>
|
||||
<p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the popover to that <code><div></code> instead.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-popover-multiline">
|
||||
<h4>Multiple-line links</h4>
|
||||
<p>Sometimes you want to add a popover to a hyperlink that wraps multiple lines. The default behavior of the popover plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
|
||||
</div>
|
||||
@ -1366,7 +1367,7 @@
|
||||
<h2 id="popovers-examples">Examples</h2>
|
||||
<h3>Static popover</h3>
|
||||
<p>Four options are available: top, right, bottom, and left aligned.</p>
|
||||
<div class="bs-example bs-example-popover">
|
||||
<div class="bs-example bs-example-popover" data-example-id="static-popovers">
|
||||
<div class="popover top">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title">Popover top</h3>
|
||||
@ -1445,7 +1446,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<h4>Dismiss on next click</h4>
|
||||
<p>Use the <code>focus</code> trigger to dismiss popovers on the next click that the user makes.</p>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-popover-dismiss-click">
|
||||
<h4>Specific markup required for dismiss-on-next-click</h4>
|
||||
<p>For proper cross-browser and cross-platform behavior, you must use the <code><a></code> tag, <i>not</i> the <code><button></code> tag, and you also must include a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#tabindex"><code>tabindex</code></a> attribute.</p>
|
||||
</div>
|
||||
@ -1459,7 +1460,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<p>Enable popovers via JavaScript:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'#example'</span><span class="p">).</span><span class="nx">popover</span><span class="p">(</span><span class="nx">options</span><span class="p">)</span></code></pre></div>
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="popovers-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -1564,7 +1565,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-popover-data">
|
||||
<h4>Data attributes for individual popovers</h4>
|
||||
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
|
||||
</div>
|
||||
@ -1588,9 +1589,9 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<h4>.popover('destroy')</h4>
|
||||
<p>Hides and destroys an element's popover.</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'#element'</span><span class="p">).</span><span class="nx">popover</span><span class="p">(</span><span class="s1">'destroy'</span><span class="p">)</span></code></pre></div>
|
||||
<h3>Events</h3>
|
||||
<h3 id="popovers-events">Events</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -1628,7 +1629,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<h2 id="alerts-examples">Example alerts</h2>
|
||||
<p>Add dismiss functionality to all alert messages with this plugin.</p>
|
||||
<p>When using a <code>.close</code> button, it must be the first child of the <code>.alert-dismissible</code> and no text content may come before it in the markup.</p>
|
||||
<div class="bs-example bs-example-standalone">
|
||||
<div class="bs-example bs-example-standalone" data-example-id="dismissible-alert-js">
|
||||
<div class="alert alert-warning alert-dismissible fade in" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
|
||||
@ -1657,7 +1658,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<p>To have your alerts use animation when closing, make sure they have the <code>.fade</code> and <code>.in</code> classes already applied to them.</p>
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="alerts-methods">Methods</h3>
|
||||
|
||||
<h4>$().alert()</h4>
|
||||
<p>Makes an alert listen for click events on descendant elements which have the <code>data-dismiss="alert"</code> attribute. (Not necessary when using the data-api's auto-initialization.)</p>
|
||||
@ -1666,10 +1667,10 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<p>Closes an alert by removing it from the DOM. If the <code>.fade</code> and <code>.in</code> classes are present on the element, the alert will fade out before it is removed.</p>
|
||||
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="alerts-events">Events</h3>
|
||||
<p>Bootstrap's alert plugin exposes a few events for hooking into alert functionality.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -1698,14 +1699,14 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<p class="lead">Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-buttons-ff-autocomplete">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>. See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a>.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="buttons-stateful">Stateful</h2>
|
||||
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bs-callout bs-callout-info" id="callout-buttons-state-names">
|
||||
<h4>Use whichever state you like!</h4>
|
||||
<p>For the sake of this demonstration, we are using <code>data-loading-text</code> and <code>$().button('loading')</code>, but that's not the only state you can use. <a href="#buttons-methods">See more on this below in the <code>$().button(string)</code> documentation</a>.</p>
|
||||
</div>
|
||||
@ -1728,7 +1729,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<h2 id="buttons-single-toggle">Single toggle</h2>
|
||||
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-buttons-single-pretoggled">
|
||||
<h4>Pre-toggled buttons need <code>.active</code> and <code>aria-pressed="true"</code></h4>
|
||||
<p>For pre-toggled buttons, you must add the <code>.active</code> class and the <code>aria-pressed="true"</code> attribute to the <code>button</code> yourself.</p>
|
||||
</div>
|
||||
@ -1743,15 +1744,15 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<h2 id="buttons-checkbox-radio">Checkbox / Radio</h2>
|
||||
<p>Add <code>data-toggle="buttons"</code> to a <code>.btn-group</code> containing checkbox or radio inputs to enable toggling in their respective styles.</p>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-buttons-multi-preselected">
|
||||
<h4>Preselected options need <code>.active</code></h4>
|
||||
<p>For preselected options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-buttons-only-click">
|
||||
<h4>Visual checked state only updated on click</h4>
|
||||
<p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code><input type="reset"></code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="buttons-checkbox">
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked)
|
||||
@ -1776,7 +1777,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<span class="nt"></label></span>
|
||||
<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="buttons-radio">
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected)
|
||||
@ -1828,13 +1829,19 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<h3>About</h3>
|
||||
<p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bs-callout bs-callout-danger" id="callout-collapse-dependency">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Collapse requires the <a href="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
|
||||
<h2 id="collapse-examples">Example accordion</h2>
|
||||
<p>Using the collapse plugin, we built a simple accordion by extending the panel component.</p>
|
||||
<h2 id="collapse-example">Example</h2>
|
||||
<p>Click the buttons below to show and hide another element via class changes:</p>
|
||||
<ul>
|
||||
<li><code>.collapse</code> hides content</li>
|
||||
<li><code>.collapsing</code> is applied during transitions</li>
|
||||
<li><code>.collapse.in</code> shows content</li>
|
||||
</ul>
|
||||
<p>You can use a link with the <code>href</code> attribute, or a button with the <code>data-target</code> attribute. In both cases, the <code>data-toggle="collapse"</code> is required.</p>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
@ -1956,7 +1963,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<span class="nt"><div</span> <span class="na">id=</span><span class="s">"demo"</span> <span class="na">class=</span><span class="s">"collapse in"</span><span class="nt">></span>...<span class="nt"></div></span></code></pre></div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bs-callout bs-callout-warning" id="callout-collapse-accessibility">
|
||||
<h4>Make expand/collapse controls accessible</h4>
|
||||
<p>Be sure to add <code>aria-expanded</code> to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of <code>aria-expanded="false"</code>. If you've set the collapsible element to be open by default using the <code>in</code> class, set <code>aria-expanded="true"</code> on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.</p>
|
||||
<p>Additionally, if your control element is targetting a single collapsible element – i.e. the <code>data-target</code> attribute is pointing to an <code>id</code> selector – you may add an additional <code>aria-controls</code> attribute to the control element, containing the <code>id</code> of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.</p>
|
||||
@ -1979,7 +1986,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<p>Enable manually with:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'.collapse'</span><span class="p">).</span><span class="nx">collapse</span><span class="p">()</span></code></pre></div>
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="collapse-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-parent=""</code>.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -2008,7 +2015,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="collapse-methods">Methods</h3>
|
||||
|
||||
<h4>.collapse(options)</h4>
|
||||
<p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>.
|
||||
@ -2025,10 +2032,10 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<h4>.collapse('hide')</h4>
|
||||
<p>Hides a collapsible element.</p>
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="collapse-events">Events</h3>
|
||||
<p>Bootstrap's collapse class exposes a few events for hooking into collapse functionality.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -2068,7 +2075,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<p>A slideshow component for cycling through elements, like a carousel. <strong>Nested carousels are not supported.</strong></p>
|
||||
|
||||
<h2 id="carousel-examples">Examples</h2>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="simple-carousel">
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
|
||||
@ -2149,7 +2156,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
<h3>Optional captions</h3>
|
||||
<p>Add captions to your slides easily with the <code>.carousel-caption</code> element within any <code>.item</code>. Place just about any optional HTML within there and it will be automatically aligned and formatted.</p>
|
||||
<div class="bs-example">
|
||||
<div class="bs-example" data-example-id="carousel-with-captions">
|
||||
<div id="carousel-example-captions" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li>
|
||||
@ -2210,7 +2217,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<p>Call carousel manually with:</p>
|
||||
<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">$</span><span class="p">(</span><span class="s1">'.carousel'</span><span class="p">).</span><span class="nx">carousel</span><span class="p">()</span></code></pre></div>
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="carousel-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -2251,7 +2258,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
<h3>Methods</h3>
|
||||
<h3 id="carousel-methods">Methods</h3>
|
||||
|
||||
<h4>.carousel(options)</h4>
|
||||
<p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p>
|
||||
@ -2275,7 +2282,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<h4>.carousel('next')</h4>
|
||||
<p>Cycles to the next item.</p>
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="carousel-events">Events</h3>
|
||||
<p>Bootstrap's carousel class exposes two events for hooking into carousel functionality.</p>
|
||||
<p>Both events have the following additional properties:</p>
|
||||
<ul>
|
||||
@ -2283,7 +2290,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<li><code>relatedTarget</code>: The DOM element that is being slid into place as the active item.</li>
|
||||
</ul>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -2347,7 +2354,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<span class="p">})</span></code></pre></div>
|
||||
|
||||
|
||||
<h3>Options</h3>
|
||||
<h3 id="affix-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset-top="200"</code>.</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
@ -2379,10 +2386,10 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
|
||||
<h3>Events</h3>
|
||||
<h3 id="affix-events">Events</h3>
|
||||
<p>Bootstrap's affix plugin exposes a few events for hooking into affix functionality.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<table class="table table-bordered table-striped bs-events-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Event Type</th>
|
||||
@ -2422,8 +2429,8 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="bs-docs-sidebar hidden-print hidden-xs hidden-sm" role="complementary">
|
||||
<div class="col-md-3" role="complementary">
|
||||
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav bs-docs-sidenav">
|
||||
|
||||
<li>
|
||||
@ -2532,7 +2539,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
Preview theme
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -2563,7 +2570,7 @@ sagittis lacus vel augue laoreet rutrum faucibus."</span><span class="nt">></
|
||||
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>.</p>
|
||||
<p>Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
|
||||
<ul class="bs-docs-footer-links muted">
|
||||
<ul class="bs-docs-footer-links text-muted">
|
||||
<li>Currently v3.3.1</li>
|
||||
<li>·</li>
|
||||
<li><a href="https://github.com/twbs/bootstrap">GitHub</a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user