docs.html 255.93 KiB
---
layout: default
title: Bootstrap Documentation
---
<div class="bs-docs-container">
  <!-- Welcome
  ================================================== -->
  <div id="welcome" class="bs-docs-section-header">
    <h1>Welcome</h1>
    <p class="lead">Welcome to the Bootstrap documentation, the living, interactive style and code guide for all things Bootstrap. If you're new here, continue reading to learn how to get started. Otherwise, carry on you beautiful person you.</p>
  </div>
  <!-- Getting started
  ================================================== -->
  <div class="bs-docs-section" id="getting-started">
    <div class="page-header">
      <h1>Getting started</h1>
    </div>
    <p class="lead">There are a few easy ways to quickly get started with Bootstrap, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.</p>
    <div class="row">
      <div class="col-span-6">
        <h3>Compiled CSS and JS</h3>
        <p><strong>The fastest way to get started:</strong> get the compiled and minified versions of our CSS, JavaScript, and fonts. No documentation or original source files are included.</p>
        <p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a></p>
      </div>
      <div class="col-span-6">
        <h3>Latest source code</h3>
        <p>Get the original files for all CSS and JavaScript, along with a local copy of the docs by downloading the latest version directly from GitHub.</p>
        <p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download Bootstrap source</a></p>
      </div>
      <div class="col-span-6">
        <h3>Clone or fork via GitHub</h3>
        <p>Clone the entire project or fork your own version of Bootstrap to make it your own by visiting us on GitHub.</p>
        <p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'GitHub project']);">GitHub repository</a></p>
      </div>
      <div class="col-span-6">
        <h3>Bower</h3>
        <p>Install and manage the original files for all CSS and JavaScript, along with a local copy of the docs, using <a href="http://twitter.github.com/bower">Bower</a>.</p>
        {% highlight bash %}$ bower install bootstrap{% endhighlight %}
      </div>
    </div>
  </div>
  <!-- File structure
  ================================================== -->
  <div class="bs-docs-section" id="whats-included">
    <div class="page-header">
      <h1>What's included</h1>
    </div>
    <p class="lead">Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.</p>
    <p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
{% highlight bash %}
  bootstrap/
  ├── css/
  │   ├── bootstrap.css
  │   ├── bootstrap.min.css
  ├── js/
  │   ├── bootstrap.js
  │   ├── bootstrap.min.js
  └── fonts/
      ├── glyphiconshalflings-regular.eot
      ├── glyphiconshalflings-regular.otf
      ├── glyphiconshalflings-regular.svg
      ├── glyphiconshalflings-regular.ttf
      └── glyphiconshalflings-regular.woff
{% endhighlight %}
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
<p>This is the most basic form of Bootstrap: compiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). The image files are compressed using <a href="http://imageoptim.com/">ImageOptim</a>, a Mac app for compressing PNGs.</p> <p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included.</p> </div> <!-- Examples ================================================== --> <div class="bs-docs-section" id="examples"> <div class="page-header"> <h1>Templates and examples</h1> </div> <p class="lead">Make use of a super basic HTML template, or dive into a few examples we've started for you. We encourage folks to iterate on these examples and not simply use them as an end result.</p> <h3>HTML template</h3> <p>Copy and paste the HTML from below to get started with a bare bones Bootstrap document.</p> {% highlight html linenos %} <!DOCTYPE html> <html> <head> <title>Bootstrap 101 Template</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> </head> <body> <h1>Hello, world!</h1> <!-- JavaScript plugins (requires jQuery) --> <script src="http://code.jquery.com/jquery.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> <!-- Optionally enable responsive features in IE8 --> <script src="js/respond.js"></script> </body> </html> {% endhighlight %} <h3>Examples</h3> <div class="row bs-docs-examples"> <div class="col-span-4"> <a class="thumbnail" href="/examples/starter-template/" target="_blank"> <img src="/assets/img/examples/bootstrap-example-starter.png" alt=""> </a> <h4>Starter template</h4> <p>A barebones HTML document with all the Bootstrap CSS and JavaScript included.</p> </div> <div class="col-span-4"> <a class="thumbnail" href="/examples/jumbotron/" target="_blank"> <img src="/assets/img/examples/bootstrap-example-marketing.png" alt=""> </a> <h4>Basic marketing site</h4> <p>Featuring a hero unit for a primary message and three supporting elements.</p> </div> <div class="col-span-4"> <a class="thumbnail" href="/examples/jumbotron-narrow/" target="_blank"> <img src="/assets/img/examples/bootstrap-example-jumbotron-narrow.png" alt=""> </a> <h4>Narrow marketing</h4> <p>Slim, lightweight marketing template for small projects or teams.</p> </div> <div class="col-span-4"> <a class="thumbnail" href="/examples/justified-nav/" target="_blank"> <img src="/assets/img/examples/bootstrap-example-justified-nav.png" alt=""> </a> <h4>Justified nav</h4> <p>Marketing page with equal-width navigation links in a modified navbar.</p> </div> <div class="col-span-4"> <a class="thumbnail" href="/examples/signin/" target="_blank">