Bootstrap 3.2.0 Examples

Helper classes

text-hide text-hide text-muted text-primary text-success text-info text-warning text-danger

text-left

text-center

text-right

text-nowrap

text-justify

text-lowercase

text-uppercase

text-capitalize

bg-primary bg-success bg-info bg-warning bg-danger

pull-left pull-right

center-block

show / hidden / sr-only / sr-only-focusable sr-only sr-only

<button type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>

<span class="caret"></span>

Responsive utilities

Extra small devices
Phones (<768px)
Small devices
Tablets (≥768px)
Medium devices
Desktops (≥992px)
Large devices
Desktops (≥1200px)
xs sm md lg
visible-*-* / hidden-* / visible-print-* / hidden-print
visible-xs-block visible-sm-inline visible-md-inline-block / visible-print-xs

Core CSS

Containers

Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to padding and more, neither container is nestable.

Grid

col-xs-*col-sm-*col-md-*col-lg-*
col-*-offset-*
col-*-push-*(往右边推) / col-*-pull-*(往左边拉)

Responsive column resets With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a .clearfix and our responsive utility classes.

Headings

h1 Secondary text

h2

h3

h4

h5
h6

All HTML headings, <h1> through <h6>, are available. .h1 through .h6 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.

Create lighter, secondary text in any heading with a generic <small> tag or the .small class.

Global default font-size is 14px, with a line-height of 1.428. This is applied to the <body> and all paragraphs. In addition, <p> receive a bottom margin of half their computed line-height (10px by default).

Make a paragraph stand out by adding .lead

mark del s ins u strong em code kbd var samp abbr HTML

pre
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
                .pre-scrollable
            
Address: 795 Folsom Ave, Suite 600.
San Francisco, CA 94107

blockquote

Someone famous in Source Title

.blockquote-reverse

Someone famous in Source Title

.dl-horizontal
A description list is perfect for defining terms.
Felis euismod semper eget lacinia
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
Column heading Column heading Column heading Column heading Column heading
tr.active
Column content Column content Column content Column content Column content
tr.success
Column content Column content Column content Column content Column content
tr.info
Column content Column content Column content Column content Column content
tr.warning
Column content Column content Column content Column content Column content
tr.danger
td.active td.success td.info td.warning td.danger
form

.help-block

.form-inline

Example block-level help text here.

.form-horizontal

.form-control-static

fieldset disabled
While button classes can be used on <a>, <button>, or <input> element, only <button> elements are supported within our nav and navbar components. As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.
Button Appearance Size State Display
Responsive image
@

Example heading New

Inbox 42

Hello, world!

...

Learn more

...

.thumbnail>caption

...

Button Button

60%
45% Complete
64x64

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
64x64

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
64x64

Nested media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Cras justo odio 14 Dapibus ac facilisis in 14 Morbi leo risus 14 Porta ac consectetur ac 14 Vestibulum at eros 14

List group item heading

Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.

.panel-heading>.panel-title

.panel-body
Look, I'm in a well!
btn1 btn2 btn3 btn4