getting-started.html 17.5 KB
Newer Older
1
2
3
4
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
5
    <title>Getting · Bootstrap</title>
6
7
8
9
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

10
    <!-- Bootstrap core CSS -->
11
    <link href="assets/css/bootstrap.css" rel="stylesheet">
12
13

    <!-- Documentation extras -->
14
15
16
    <link href="assets/css/docs.css" rel="stylesheet">
    <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">

17
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
18
    <!--[if lt IE 9]>
19
      <script src="assets/js/html5shiv.js"></script>
20
      <script src="assets/js/respond/respond.min.js"></script>
21
22
    <![endif]-->

23
    <!-- Favicons -->
24
25
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
Mark Otto's avatar
Mark Otto committed
26
27
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
                    <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
28
                                   <link rel="shortcut icon" href="assets/ico/favicon.png">
29
30
31

  </head>

32
  <body data-spy="scroll" data-target=".bs-docs-sidebar">
33
34
35

    <!-- Navbar
    ================================================== -->
36
    <div class="navbar navbar-inverse navbar-fixed-top">
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
      <div class="container">
        <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="brand" href="./index.html">Bootstrap</a>
        <div class="nav-collapse collapse">
          <ul class="nav">
            <li class="">
              <a href="./index.html">Home</a>
            </li>
            <li class="active">
              <a href="./getting-started.html">Get started</a>
            </li>
            <li class="">
53
              <a href="./css.html">CSS</a>
54
55
56
57
58
59
60
61
62
63
64
            </li>
            <li class="">
              <a href="./components.html">Components</a>
            </li>
            <li class="">
              <a href="./javascript.html">JavaScript</a>
            </li>
            <li class="">
              <a href="./customize.html">Customize</a>
            </li>
          </ul>
65
66
67
68
        </div>
      </div>
    </div>

69
<!-- Subhead
70
================================================== -->
71
<header class="bs-docs-jumbotron subhead">
72
  <div class="container">
73
    <h1>Getting started</h1>
74
    <p class="lead">Overview of the project, its contents, and how to get started with a simple template.</p>
75
  </div>
76
77
</header>

78
79

  <div class="container">
80

81
82
83
84
    <!-- Docs nav
    ================================================== -->
    <div class="row">
      <div class="span3 bs-docs-sidebar">
Mark Otto's avatar
Mark Otto committed
85
        <ul class="nav nav-list bs-docs-sidenav">
Mark Otto's avatar
Mark Otto committed
86
87
88
89
90
91
          <li><a href="#download-bootstrap"><i class="glyphicon-chevron-right"></i> Download</a></li>
          <li><a href="#file-structure"><i class="glyphicon-chevron-right"></i> File structure</a></li>
          <li><a href="#contents"><i class="glyphicon-chevron-right"></i> What's included</a></li>
          <li><a href="#html-template"><i class="glyphicon-chevron-right"></i> HTML template</a></li>
          <li><a href="#examples"><i class="glyphicon-chevron-right"></i> Examples</a></li>
          <li><a href="#what-next"><i class="glyphicon-chevron-right"></i> What next?</a></li>
92
93
94
        </ul>
      </div>
      <div class="span9">
95
96
97



98
99
100
101
102
        <!-- Download
        ================================================== -->
        <section id="download-bootstrap">
          <div class="page-header">
            <h1>1. Download</h1>
103
          </div>
104
          <p class="lead">Before downloading, be sure to have a code editor (we recommend <a href="http://sublimetext.com/2">Sublime Text 2</a>) and some working knowledge of HTML and CSS. We won't walk through the source files here, but they are available for download. We'll focus on getting started with the compiled Bootstrap files.</p>
105

106
          <div class="row">
Mark Otto's avatar
Mark Otto committed
107
            <div class="span6">
Mark Otto's avatar
Mark Otto committed
108
              <h2>Download compiled</h2>
109
110
111
              <p><strong>Fastest way to get started:</strong> get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.</p>
              <p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" >Download Bootstrap</a></p>
            </div>
Mark Otto's avatar
Mark Otto committed
112
            <div class="span6">
Mark Otto's avatar
Mark Otto committed
113
              <h2>Download source</h2>
Mark Otto's avatar
Mark Otto committed
114
              <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>
115
116
              <p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" >Download Bootstrap source</a></p>
            </div>
117
          </div>
118
        </section>
119
120
121



122
123
124
125
126
127
        <!-- File structure
        ================================================== -->
        <section id="file-structure">
          <div class="page-header">
            <h1>2. File structure</h1>
          </div>
128
          <p class="lead">Within the download you'll find the following file structure and contents, logically grouping common assets and providing both compiled and minified variations.</p>
129
          <p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
Mark Otto's avatar
Mark Otto committed
130
131
132
133
134
135
136
137
<pre class="prettyprint">
  bootstrap/
  ├── css/
  │   ├── bootstrap.css
  │   ├── bootstrap.min.css
  ├── js/
  │   ├── bootstrap.js
  │   ├── bootstrap.min.js
138
139
140
141
142
143
  └── fonts/
      ├── glyphiconshalflings-regular.eot
      ├── glyphiconshalflings-regular.otf
      ├── glyphiconshalflings-regular.svg
      ├── glyphiconshalflings-regular.ttf
      └── glyphiconshalflings-regular.woff
144
</pre>
145
          <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>
146
          <p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included.</p>
147
        </section>
148
149
150



151
152
153
154
155
156
        <!-- Contents
        ================================================== -->
        <section id="contents">
          <div class="page-header">
            <h1>3. What's included</h1>
          </div>
157
          <p class="lead">Bootstrap comes equipped with HTML, CSS, and JS for all sorts of things, but they can be summarized with a handful of categories visible at the top of the <a href="http://getbootstrap.com">Bootstrap documentation</a>.</p>
158

Mark Otto's avatar
Mark Otto committed
159
          <h2>Docs sections</h2>
160
161
162
163
          <p>In addition to the getting started documentation you're reading now, the Bootstrap docs are broken into a few key pages.</p>

          <h4><a href="http://twitter.github.com/bootstrap/css.html">Core CSS</a></h4>
          <p>Global styles for the body, Normalize, links, grid system, tables, forms, buttons, icons, and more.</p>
164
          <h4><a href="http://twitter.github.com/bootstrap/components.html">Components</a></h4>
165
          <p>Basic styles for common interface components like tabs and pills, navbar, alerts, page headers, and more. Head here to see what kind of custom components Bootstrap has to offer beyond basic HTML elements.</p>
166
167
          <h4><a href="http://twitter.github.com/bootstrap/javascript.html">JavaScript plugins</a></h4>
          <p>Similar to Components, these JavaScript plugins are interactive components for things like tooltips, popovers, modals, and more.</p>
168
169
170
171
172
173
174
175
176
177
        </section>



        <!-- HTML template
        ================================================== -->
        <section id="html-template">
          <div class="page-header">
            <h1>4. Basic HTML template</h1>
          </div>
178
          <p class="lead">With a brief intro into the contents out of the way, we can focus on putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="./getting-started.html#file-structure">File structure</a>.</p>
179
          <p>Now, here's a look at a <strong>typical HTML file</strong>:</p>
180
<pre class="prettyprint linenums">
181
&lt;!DOCTYPE html&gt;
182
183
184
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Bootstrap 101 Template&lt;/title&gt;
Mark Otto's avatar
Mark Otto committed
185
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
186
187
188
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello, world!&lt;/h1&gt;
Mark Otto's avatar
Mark Otto committed
189
    &lt;script src="http://code.jquery.com/jquery.js"&gt;&lt;/script&gt;
190
191
192
  &lt;/body&gt;
&lt;/html&gt;
</pre>
193
          <p>To make this <strong>a Bootstrapped template</strong>, just include the appropriate CSS and JS files:</p>
194
<pre class="prettyprint linenums">
195
&lt;!DOCTYPE html&gt;
196
197
198
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Bootstrap 101 Template&lt;/title&gt;
Mark Otto's avatar
Mark Otto committed
199
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
200
    &lt;!-- Bootstrap --&gt;
201
    &lt;link href="css/bootstrap.min.css" rel="stylesheet" media="screen"&gt;
202
203
204
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello, world!&lt;/h1&gt;
Mark Otto's avatar
Mark Otto committed
205
    &lt;script src="http://code.jquery.com/jquery.js"&gt;&lt;/script&gt;
206
    &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
207
208
209
  &lt;/body&gt;
&lt;/html&gt;
</pre>
210
          <p><strong>And you're set!</strong> With those two files added, you can begin to develop any site or application with Bootstrap.</p>
211
212
213
214
215
216
217
218
219
220

          <hr>

          <h4>Responsive features in IE8</h4>
          <p>Internet Explorer 8 lacks support for media queries, the method by which we deliver responsive CSS to folks. To enable that, you need to include a third party tool (which we include in the project repository) called <a href="https://github.com/scottjehl/Respond">Respond.js</a>.</p>
<pre class="prettyprint linenums">
&lt;!--[if lt IE 9]&gt;
  &lt;script src="assets/js/respond/respond.js"&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
221
        </section>
222

223
224


225
226
227
228
229
230
231
        <!-- Examples
        ================================================== -->
        <section id="examples">
          <div class="page-header">
            <h1>5. Examples</h1>
          </div>
          <p class="lead">Move beyond the base template with a few example layouts. We encourage folks to iterate on these examples and not simply use them as an end result.</p>
Mark Otto's avatar
Mark Otto committed
232
          <div class="row bs-docs-examples">
233
            <div class="span4">
234
              <a class="thumbnail" href="examples/starter-template.html">
Mark Otto's avatar
Mark Otto committed
235
                <img src="assets/img/examples/bootstrap-example-starter.png" alt="">
236
237
238
              </a>
              <h4>Starter template</h4>
              <p>A barebones HTML document with all the Bootstrap CSS and JavaScript included.</p>
239
            </div>
240
            <div class="span4">
Mark Otto's avatar
Mark Otto committed
241
              <a class="thumbnail" href="examples/jumbotron.html">
Mark Otto's avatar
Mark Otto committed
242
                <img src="assets/img/examples/bootstrap-example-marketing.png" alt="">
243
              </a>
244
              <h4>Basic marketing site</h4>
245
              <p>Featuring a hero unit for a primary message and three supporting elements.</p>
Mark Otto's avatar
Mark Otto committed
246
            </div>
247
            <div class="span4">
248
249
              <a class="thumbnail" href="examples/jumbotron-narrow.html">
                <img src="assets/img/examples/bootstrap-example-jumbotron-narrow.png" alt="">
250
251
252
              </a>
              <h4>Narrow marketing</h4>
              <p>Slim, lightweight marketing template for small projects or teams.</p>
Mark Otto's avatar
Mark Otto committed
253
            </div>
254
            <div class="span4">
Mark Otto's avatar
Mark Otto committed
255
256
257
258
259
              <a class="thumbnail" href="examples/justified-nav.html">
                <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>
260
            </div>
261
            <div class="span4">
262
263
264
265
266
              <a class="thumbnail" href="examples/signin.html">
                <img src="assets/img/examples/bootstrap-example-signin.png" alt="">
              </a>
              <h4>Sign in</h4>
              <p>Barebones sign in form with custom, larger form controls and a flexible layout.</p>
Mark Otto's avatar
Mark Otto committed
267
            </div>
268
            <div class="span4">
269
270
271
272
273
              <a class="thumbnail" href="examples/sticky-footer.html">
                <img src="assets/img/examples/bootstrap-example-sticky-footer.png" alt="">
              </a>
              <h4>Sticky footer</h4>
              <p>Pin a fixed-height footer to the bottom of the user's viewport.</p>
274
            </div>
275
276
277
278
279
280
281
            <div class="span4">
              <a class="thumbnail" href="examples/sticky-footer.html">
                <img src="assets/img/examples/bootstrap-example-sticky-footer.png" alt="">
              </a>
              <h4>Sticky footer w/ navbar</h4>
              <p>Add a fixed navbar to the default sticky footer template.</p>
            </div>
282
            <div class="span4">
283
284
285
286
              <a class="thumbnail" href="examples/carousel.html">
                <img src="assets/img/examples/bootstrap-example-carousel.png" alt="">
              </a>
              <h4>Carousel jumbotron</h4>
287
              <p>An interactive riff on the basic marketing site featuring a prominent carousel.</p>
Mark Otto's avatar
Mark Otto committed
288
289
            </div>
          </div>
290
291
292
293
294
295
296
297
298
299
300
301
        </section>




        <!-- Next
        ================================================== -->
        <section id="what-next">
          <div class="page-header">
            <h1>What next?</h1>
          </div>
          <p class="lead">Head to the docs for information, examples, and code snippets, or take the next leap and customize Bootstrap for any upcoming project.</p>
302
          <a class="btn btn-large btn-primary" href="./css.html" >Visit the Bootstrap docs</a>
Mark Otto's avatar
Mark Otto committed
303
          <a class="btn btn-large" href="./customize.html" style="margin-left: 5px;" >Customize Bootstrap</a>
304
        </section>
305
306
307



308

309
      </div>
310
    </div>
311

312
  </div>
313

314

Mark Otto's avatar
Mark Otto committed
315

Mark Otto's avatar
Mark Otto committed
316
317
318
319
    <!-- Footer
    ================================================== -->
    <footer class="footer">
      <div class="container">
Mark Otto's avatar
Mark Otto committed
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338

        <div class="bs-docs-social">
          <ul class="bs-docs-social-buttons">
            <li>
              <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
            </li>
            <li>
              <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe>
            </li>
            <li class="follow-btn">
              <a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a>
            </li>
            <li class="tweet-btn">
              <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twitter.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a>
            </li>
          </ul>
        </div>


339
340
341
        <p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
        <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
        <p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
Mark Otto's avatar
Mark Otto committed
342
        <ul class="footer-links">
343
344
345
346
          <li><a href="http://blog.getbootstrap.com">Blog</a></li>
          <li class="muted">&middot;</li>
          <li><a href="https://github.com/twitter/bootstrap/issues?state=open">Issues</a></li>
          <li class="muted">&middot;</li>
Mark Otto's avatar
Mark Otto committed
347
348
349
350
          <li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li>
        </ul>
      </div>
    </footer>
351

352

Mark Otto's avatar
Mark Otto committed
353

354
    <!-- Bootstrap core JavaScript
Mark Otto's avatar
Mark Otto committed
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="assets/js/jquery.js"></script>
    <script src="assets/js/bootstrap-transition.js"></script>
    <script src="assets/js/bootstrap-alert.js"></script>
    <script src="assets/js/bootstrap-modal.js"></script>
    <script src="assets/js/bootstrap-dropdown.js"></script>
    <script src="assets/js/bootstrap-scrollspy.js"></script>
    <script src="assets/js/bootstrap-tab.js"></script>
    <script src="assets/js/bootstrap-tooltip.js"></script>
    <script src="assets/js/bootstrap-popover.js"></script>
    <script src="assets/js/bootstrap-button.js"></script>
    <script src="assets/js/bootstrap-collapse.js"></script>
    <script src="assets/js/bootstrap-carousel.js"></script>
    <script src="assets/js/bootstrap-typeahead.js"></script>
    <script src="assets/js/bootstrap-affix.js"></script>
371

372
    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
373
374
375
    <script src="assets/js/holder/holder.js"></script>
    <script src="assets/js/google-code-prettify/prettify.js"></script>

Mark Otto's avatar
Mark Otto committed
376
    <script src="assets/js/application.js"></script>
377
378
379
380


  </body>
</html>