742b51847236bfa61a07f7bfd3aacadf4ad90199.svn-base 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  8. <meta name="description" content="">
  9. <meta name="author" content="">
  10. <link rel="icon" href="../../favicon.ico">
  11. <title>Grid Template for Bootstrap</title>
  12. <!-- Bootstrap core CSS -->
  13. <link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
  14. <!-- Custom styles for this template -->
  15. <link href="grid.css" rel="stylesheet">
  16. <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  17. <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
  18. </head>
  19. <body>
  20. <div class="container">
  21. <div class="page-header">
  22. <h1>Bootstrap grid examples</h1>
  23. <p class="lead">Basic grid layouts to get you familiar with building within the Bootstrap grid system.</p>
  24. </div>
  25. <h3>Five grid tiers</h3>
  26. <p>There are five tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.</p>
  27. <div class="row">
  28. <div class="col-xs-4">.col-xs-4</div>
  29. <div class="col-xs-4">.col-xs-4</div>
  30. <div class="col-xs-4">.col-xs-4</div>
  31. </div>
  32. <div class="row">
  33. <div class="col-sm-4">.col-sm-4</div>
  34. <div class="col-sm-4">.col-sm-4</div>
  35. <div class="col-sm-4">.col-sm-4</div>
  36. </div>
  37. <div class="row">
  38. <div class="col-md-4">.col-md-4</div>
  39. <div class="col-md-4">.col-md-4</div>
  40. <div class="col-md-4">.col-md-4</div>
  41. </div>
  42. <div class="row">
  43. <div class="col-lg-4">.col-lg-4</div>
  44. <div class="col-lg-4">.col-lg-4</div>
  45. <div class="col-lg-4">.col-lg-4</div>
  46. </div>
  47. <div class="row">
  48. <div class="col-xl-4">.col-xl-4</div>
  49. <div class="col-xl-4">.col-xl-4</div>
  50. <div class="col-xl-4">.col-xl-4</div>
  51. </div>
  52. <h3>Three equal columns</h3>
  53. <p>Get three equal-width columns <strong>starting at desktops and scaling to large desktops</strong>. On mobile devices, tablets and below, the columns will automatically stack.</p>
  54. <div class="row">
  55. <div class="col-md-4">.col-md-4</div>
  56. <div class="col-md-4">.col-md-4</div>
  57. <div class="col-md-4">.col-md-4</div>
  58. </div>
  59. <h3>Three unequal columns</h3>
  60. <p>Get three columns <strong>starting at desktops and scaling to large desktops</strong> of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.</p>
  61. <div class="row">
  62. <div class="col-md-3">.col-md-3</div>
  63. <div class="col-md-6">.col-md-6</div>
  64. <div class="col-md-3">.col-md-3</div>
  65. </div>
  66. <h3>Two columns</h3>
  67. <p>Get two columns <strong>starting at desktops and scaling to large desktops</strong>.</p>
  68. <div class="row">
  69. <div class="col-md-8">.col-md-8</div>
  70. <div class="col-md-4">.col-md-4</div>
  71. </div>
  72. <h3>Full width, single column</h3>
  73. <p class="text-warning">No grid classes are necessary for full-width elements.</p>
  74. <hr>
  75. <h3>Two columns with two nested columns</h3>
  76. <p>Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns <strong>starting at desktops and scaling to large desktops</strong>, with another two (equal widths) within the larger column.</p>
  77. <p>At mobile device sizes, tablets and down, these columns and their nested columns will stack.</p>
  78. <div class="row">
  79. <div class="col-md-8">
  80. .col-md-8
  81. <div class="row">
  82. <div class="col-md-6">.col-md-6</div>
  83. <div class="col-md-6">.col-md-6</div>
  84. </div>
  85. </div>
  86. <div class="col-md-4">.col-md-4</div>
  87. </div>
  88. <hr>
  89. <h3>Mixed: mobile and desktop</h3>
  90. <p>The Bootstrap 3 grid system has four tiers of classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). You can use nearly any combination of these classes to create more dynamic and flexible layouts.</p>
  91. <p>Each tier of classes scales up, meaning if you plan on setting the same widths for xs and sm, you only need to specify xs.</p>
  92. <div class="row">
  93. <div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
  94. <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
  95. </div>
  96. <div class="row">
  97. <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
  98. <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
  99. <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
  100. </div>
  101. <div class="row">
  102. <div class="col-xs-6">.col-xs-6</div>
  103. <div class="col-xs-6">.col-xs-6</div>
  104. </div>
  105. <hr>
  106. <h3>Mixed: mobile, tablet, and desktop</h3>
  107. <p></p>
  108. <div class="row">
  109. <div class="col-xs-12 col-sm-6 col-lg-8">.col-xs-12 .col-sm-6 .col-lg-8</div>
  110. <div class="col-xs-6 col-lg-4">.col-xs-6 .col-lg-4</div>
  111. </div>
  112. <div class="row">
  113. <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
  114. <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
  115. <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
  116. </div>
  117. <hr>
  118. <h3>Column clearing</h3>
  119. <p><a href="http://getbootstrap.com/css/#grid-responsive-resets">Clear floats</a> at specific breakpoints to prevent awkward wrapping with uneven content.</p>
  120. <div class="row">
  121. <div class="col-xs-6 col-sm-3">
  122. .col-xs-6 .col-sm-3
  123. <br>
  124. Resize your viewport or check it out on your phone for an example.
  125. </div>
  126. <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
  127. <!-- Add the extra clearfix for only the required viewport -->
  128. <div class="clearfix visible-xs"></div>
  129. <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
  130. <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
  131. </div>
  132. <hr>
  133. <h3>Offset, push, and pull resets</h3>
  134. <p>Reset offsets, pushes, and pulls at specific breakpoints.</p>
  135. <div class="row">
  136. <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
  137. <div class="col-sm-5 col-sm-offset-2 col-md-6 col-md-offset-0">.col-sm-5 .col-sm-offset-2 .col-md-6 .col-md-offset-0</div>
  138. </div>
  139. <div class="row">
  140. <div class="col-sm-6 col-md-5 col-lg-6">.col-sm-6 .col-md-5 .col-lg-6</div>
  141. <div class="col-sm-6 col-md-5 col-md-offset-2 col-lg-6 col-lg-offset-0">.col-sm-6 .col-md-5 .col-md-offset-2 .col-lg-6 .col-lg-offset-0</div>
  142. </div>
  143. </div> <!-- /container -->
  144. <!-- Bootstrap core JavaScript
  145. ================================================== -->
  146. <!-- Placed at the end of the document so the pages load faster -->
  147. </body>
  148. </html>