scaffolding.html 15.91 KiB
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!-- Le styles -->
    <link href="../bootstrap.css" rel="stylesheet">
    <link href="assets/css/docs.css" rel="stylesheet">
    <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" type="image/x-icon" href="assets/ico/favicon.ico">
    <link rel="apple-touch-icon" href="assets/ico/bootstrap-apple-57x57.png">
    <link rel="apple-touch-icon" sizes="72x72" href="assets/ico/bootstrap-apple-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="assets/ico/bootstrap-apple-114x114.png">
  </head>
  <body>
    <!-- Navbar
    ================================================== -->
    <div class="navbar navbar-fixed">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="./index.html">Bootstrap</a>
          <ul class="nav">
            <li><a href="./index.html">Overview</a></li>
            <li class="dropdown active">
              <a href="./scaffolding.html" class="dropdown-toggle" data-toggle="dropdown">
                Scaffolding
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
                <li><a href="./scaffolding.html#grid">Grid system</a></li>
                <li><a href="./scaffolding.html#layouts">Layouts</a></li>
                <li><a href="./scaffolding.html#responsive">Responsive design</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="./base-css.html" class="dropdown-toggle" data-toggle="dropdown">
                Base CSS
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
                <li><a href="./base-css.html#type">Type</a></li>
                <li><a href="./base-css.html#tables">Tables</a></li>
                <li><a href="./base-css.html#forms">Forms</a></li>
                <li><a href="./base-css.html#buttons">Buttons</a></li>
                <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="./components.html" class="dropdown-toggle" data-toggle="dropdown">
                Components
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
                <li><a href="./components.html#buttonGroups">Button groups</a></li>
                <li><a href="./components.html#buttonDropdowns">Split button dropdowns</a></li>
                <li><a href="./components.html#navs">Nav, tabs, pills</a></li>
                <li><a href="./components.html#navbar">Navbar</a></li>
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
<li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li> <li><a href="./components.html#pagination">Pagination</a></li> <li><a href="./components.html#thumbnails">Thumbnails</a></li> <li><a href="./components.html#alerts">Alert messages</a></li> </ul> </li> <li class="dropdown"> <a href="./javascript.html" class="dropdown-toggle" data-toggle="dropdown"> Javascript plugins <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><a href="./javascript.html#transitions">Transition</a></li> <li><a href="./javascript.html#modals">Modal</a></li> <li><a href="./javascript.html#dropdowns">Dropdown</a></li> <li><a href="./javascript.html#scrollspy">Scrollspy</a></li> <li><a href="./javascript.html#tabs">Tab</a></li> <li><a href="./javascript.html#tooltips">Tooltip</a></li> <li><a href="./javascript.html#popovers">Popover</a></li> <li><a href="./javascript.html#alerts">Alert</a></li> <li><a href="./javascript.html#buttons">Button</a></li> <li><a href="./javascript.html#collapse">Collapse</a></li> <li><a href="./javascript.html#carousel">Carousel</a></li> <li><a href="./javascript.html#typeahead">Typeahead</a></li> </ul> </li> <li> <a href="./less.html"> Using LESS </a> </li> </ul> </div> </div> </div> <div class="container"> <!-- Masthead ================================================== --> <header class="jumbotron subhead" id="overview"> <h1>Scaffolding</h1> <p class="lead">Bootstrap is built on a responsive 12-column grid. We've also included fixed- and fluid-width layouts based on that system.</p> </header> <!-- Grid system ================================================== --> <section id="grid-system"> <div class="page-header"> <h1>Grid system <small>12 columns with a responsive twist</small></h1> </div> <h2>Default 940px grid</h2> <div class="row show-grid"> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> </div> <div class="row show-grid">
141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
<div class="span4">4</div> <div class="span4">4</div> <div class="span4">4</div> </div> <div class="row show-grid"> <div class="span4">4</div> <div class="span8">8</div> </div> <div class="row show-grid"> <div class="span6">6</div> <div class="span6">6</div> </div> <div class="row show-grid"> <div class="span12">12</div> </div> <div class="row"> <div class="span4"> <p>The default grid system provided as part of Bootstrap is a <strong>940px-wide, 12-column grid</strong>.</p> <p>It also has three responsive variations for various devices and resolutions: phone, tablet, and large widescreen desktops.</p> </div> <div class="span4"> <pre class="prettyprint linenums"> &lt;div class="row"&gt; &lt;div class="span4"&gt;...&lt;/div&gt; &lt;div class="span8"&gt;...&lt;/div&gt; &lt;/div&gt; </pre> </div> <div class="span4"> <p>As shown here, a basic layout can be created with two "columns," each spanning a number of the 12 foundational columns we defined as part of our grid system.</p> </div> </div><!-- /row --> <h2>Offsetting columns</h2> <div class="row show-grid"> <div class="span4">4</div> <div class="span4 offset4">4 offset 4</div> </div><!-- /row --> <div class="row show-grid"> <div class="span3 offset3">3 offset 3</div> <div class="span3 offset3">3 offset 3</div> </div><!-- /row --> <div class="row show-grid"> <div class="span8 offset4">8 offset 4</div> </div><!-- /row --> <br> <h2>Nesting columns</h2> <div class="row"> <div class="span6"> <p>With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column.</p> <h4>Example</h4> <div class="row show-grid"> <div class="span6"> Level 1 of column <div class="row show-grid"> <div class="span3"> Level 2 </div> <div class="span3"> Level 2 </div> </div> </div> </div> </div> <div class="span6"> <pre class="prettyprint linenums">