1
1
1
1
1
1
1
1
1
1
1
1
4
4
4
4
8
6
6
12

The default grid system provided as part of Bootstrap is a 940px-wide, 12-column grid.

It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.

<div class="row">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

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.


Offsetting columns

4
4 offset 4
3 offset 3
3 offset 3
8 offset 4
<div class="row">
  <div class="span4">...</div>
  <div class="span4 offset4">...</div>
</div>

Nesting columns

With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new .row and set of .span* columns within an existing .span* column.

Example

Nested rows should include a set of columns that add up to the number of columns of it's parent. For example, two nested .span3 columns should be placed within a .span6.

Level 1 of column
Level 2
Level 2
<div class="row">
  <div class="span12">
    Level 1 of column
    <div class="row">
      <div class="span6">Level 2</div>
      <div class="span6">Level 2</div>
    </div>
  </div>
</div>

Fluid columns

1
1
1
1
1
1
1
1
1
1
1
1
4
4
4
4
8
6
6
12

Percents, not pixels

The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.

Fluid rows

Make any row fluid simply by changing .row to .row-fluid. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.

Markup

<div class="row-fluid">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

Fluid nesting

Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.

Fluid 12
Fluid 6
Fluid 6
<div class="row-fluid">
  <div class="span12">
    Level 1 of column
    <div class="row-fluid">
      <div class="span6">Level 2</div>
      <div class="span6">Level 2</div>
    </div>
  </div>
</div>
Variable Default value Description
@gridColumns 12 Number of columns
@gridColumnWidth 60px Width of each column
@gridGutterWidth 20px Negative space between columns
@siteWidth Computed sum of all columns and gutters Counts number of columns and gutters to set width of the .container-fixed() mixin

Variables in LESS

Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.

How to customize

Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.

Staying responsive

Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.

Fixed layout

The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">.

<body>
  <div class="container">
    ...
  </div>
</body>

Fluid layout

<div class="container-fluid"> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.

<div class="container-fluid">
  <div class="row-fluid">
    <div class="span2">
      <!--Sidebar content-->
    </div>
    <div class="span10">
      <!--Body content-->
    </div>
  </div>
</div>

Responsive devices

What they do

Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width and max-width.

  • Modify the width of column in our grid
  • Stack elements instead of float wherever necessary
  • Resize headings and text to be more appropriate for devices

Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.

Supported devices

Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:

Label Layout width Column width Gutter width
Smartphones 480px and below Fluid columns, no fixed widths
Smartphones to tablets 767px and below Fluid columns, no fixed widths
Portrait tablets 768px and above 42px 20px
Default 980px and up 60px 20px
Large display 1200px and up 70px 30px

Requires meta tag

To ensure devices display responsive pages properly, include the viewport meta tag.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Using the media queries

Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:

  1. Use the compiled responsive version, bootstrap-responsive.css
  2. Add @import "responsive.less" and recompile Bootstrap
  3. Modify and recompile responsive.less as a separate file

Why not just include it? Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.

// Landscape phones and down
@media (max-width: 480px) { ... }
// Landscape phone to portrait tablet
@media (max-width: 768px) { ... }
// Portrait tablet to landscape and desktop
@media (min-width: 768px) and (max-width: 980px) { ... }
// Large desktop
@media (min-width: 1200px) { .. }

Responsive utility classes

What are they

For faster mobile-friendly development, use these basic utility classes for showing and hidding content by device.

When to use

Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.

For example, you might show a <select> element for nav on mobile layouts, but not on tablets or desktops.

Support classes

Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in responsive.less.

Class Phones 480px and below Tablets 767px and below Desktops 768px and above
.visible-phone Visible
.visible-tablet Visible
.visible-desktop Visible
.hidden-phone Visible Visible
.hidden-tablet Visible Visible
.hidden-desktop Visible Visible

Test case

Resize your browser or load on different devices to test the above clases.

Visible on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop

Hidden on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop
真希姐妹漫画图片真人漫画妹子枕边的骗局漫画第11话振动棒系列漫画镇魂街漫画 可以看的真希姐妹漫画图片真人版漫画污职场上司枕边的骗局漫画第11话真人教师漫画图片大全图片大全图片真人bl漫画校草镇魂街漫画100章枕边的骗局漫画第11话真人版bl漫画有哪些镇魂街漫画100章枕边的骗局漫画第11话真人bl漫画名字真人家教邪恶漫画镇魂街漫画 停更镇魂街漫画 可以看的真人邪恶全彩无码漫画真人教师漫画图片大全图片搜索镇魂街漫画 停更真人教师漫画图片大全图片大全图片真人邪恶口工漫画大全镇魂街看漫画187真人漫画泡面全集镇魂街看漫画187真人四次元漫画图片真人邪恶全彩无码漫画真人邪恶全彩无码漫画大全天道亦无常,人心更反复,世间三千疾,最苦是抉择。一个被命运驱使的少年自深山中走出,就此入世…风起云涌,仙道争锋,天意无常,人心不古…历经千难万险,又该作何选择?愿只随本心,纵错也无怨! 修道无始终,何以为巅峰… 偏拗执念深,百炼不为仙… 天意虽相悖,吾只随吾心… 万劫纵不复,无怨亦无悔…2072年7月1日,封一鸣如往常一样被起床的闹钟吵醒,一睁眼,总感觉外面的气氛很压抑,往常应该大亮的天色,此时却显得昏暗无比,封一鸣从窗台向下望去,本该繁华无比的大街上此时竟空无一人,突然!楼下爆发出令人恐慌的尖叫声哭喊声夹杂着令人牙酸的吱吱声,砰砰砰,封一鸣的大门开始被人敲击,砰砰,砰砰砰,砰砰砰!声音越来越大越来越焦躁,封一鸣也被这突如其来的声音吓了一跳,他慢慢像门口走去,透过门缝,他看见一个脸上布满了眼睛的怪物,慢慢的,那怪物喉咙出突然裂开发出了声响,封一鸣被这画面惊吓的无法呼吸几乎要晕了过去,他踉跄往后倒了几步,门外却突然传开了喃喃的细语,一鸣,一鸣啊,一鸣快开门啊,我是奶奶啊一鸣,一鸣啊,奶奶好饿啊,乖孙快开开门,让奶奶……让……吃掉你,封一鸣本就未平复的心此刻掀起惊涛骇浪,随着门外的声音渐渐远去,封一鸣此刻只感到无尽的恐惧与诡异。 这座城市,,到底发生了什么,他真的是我的奶奶吗? 恭喜绑定育儿成长系统 本系统因不可描述原因 受损程度78%,无法主动提供任何帮助 如遇危险请用爱感化对方 谢谢合作 简介?什么简介 作者已经被整疯了 哈哈哈 假的 假的 全是假的 去你的育儿系统啊啊啊啊!“岳白,岳白你醒醒” 岳白睁开眼睛发现这是一个完全陌生的世界……天生绝品丹脉却一夜散尽,从家族明珠一朝变成弃子,成为一名小小的种药工,依旧无法置身事外。 遂跃于凡尘,种药炼神丹,炼体为炉鼎,活脱脱将自己炼成了绝世的神丹。 本书以男主角邹君的都市逆袭为主线,展现了一名社会底层单身汉如何在机缘巧合之下实现“系统升级”一般的开挂逆袭,以及在逆袭过程中所经历过零零总总的精彩人生。在这其中,既有令人羡慕的“桃花运”情节,也有惊险不断的人物冲突场景,科幻与玄幻并举,最终归于修真证道,成就永恒。故事从地球文明到太阳系文明再到银河系文明,精彩还在后头……各位看官,新手上道,请多关照!蓝星被神秘力量激活了生命能量收割程序,末日降临,是生命的终焉,也是生命进化突破桎梏的初始。 魏昱意外激活血脉传承水晶,突破层层生命桎梏枷锁。 且看魏昱如何在这人心险恶的末世之中,诛小人,杀怪物,屠圣母,做自己想做的事,救自己想救的人,杀自己想杀的人。 魏昱说:“我只想做一个属于自己的好人。” 一个中年上班男意外进入异界星球,开始流浪融入闯荡的故事!多元宇宙空间,每一个行为都会生成一个不同结局的剧本,如果改写人生,岂不是个体力活..... 科学前沿最新虚拟产品——时空流,横空出世....... 真实:举世战争,幕后帷幕... 虚拟:人生模拟,潜能培养... 一切的一切....居然是为了.....适应.....武器??? 天空划过一道光,一起眺望时空流下的幻雨...黑与白的浪潮中,不知何人在低语……我想挣脱前往那星空的彼端,于暗羽中刻下文明的墓志铭。
作为普通人,分身强亿点很合理吧? 三千界之屠龙令 自后天形成的怪物 坠明 逃离科尔特 珠尚 元灵法则 努力的活下去 暗夜新星 重生之我是太上老君的道童 全能禁区之王 将云 无名的尘埃 了然若流 莲仇记 大汉之上 特种兵之恋 中州生死诀 九阙之歌 十二时破晓 真人漫画泡面全集 真人bl漫画名字 真人家教邪恶漫画动态图 镇魂街漫画 可以看的 真人漫画妹子 真人四次元漫画图片 真人家教邪恶漫画动态图 真人板口工漫画全集 真人色情漫画全彩无码 真人版bl漫画有哪些 真人教师漫画图片大全图片大全 真人教师漫画图片大全图片大全 真人邪恶口工漫画大全 真人bl漫画名字 真希姐妹漫画图片 镇魂街看漫画187 真人家教邪恶漫画动态图片 真人漫画泡面全集 真人漫画:旅途 枕边的骗局漫画第11话 真人bl漫画名字 枕边的骗局漫画第11话 真人漫画:旅途 镇魂街漫画 停更 真人bl漫画校草 真人邪恶口工漫画大全图片 真人漫画泡面全集 真人漫画:旅途 真人漫画:旅途 真人色情漫画全彩无码 镇魂街漫画 可以看的 真秘汤巡礼漫画 振动棒系列漫画 真希姐妹漫画图片 真人邪恶口工漫画大全 镇魂街看漫画187 振动棒系列漫画 真人家教邪恶漫画动态图 真人邪恶口工漫画大全 枕上替婚新娘漫画 镇魂街看漫画187 真人板口工漫画全集 真人邪恶全彩无码漫画 真人家教邪恶漫画动态图片 镇魂街漫画100章 真秘汤巡礼漫画 真人教师漫画图片大全图片大全 镇魂街看漫画187 真人邪恶口工漫画大全图片 真人家教邪恶漫画 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 振兴高校 传播文化十五年,我成帝了 重生之绝世仙尊 幻散后往 转职成为魔剑士的那段日子 AG真人 欧博官网 亚星游戏官网 AG真人 百家乐官网 真人家教邪恶漫画 真人教师漫画图片大全图片搜索 枕边的骗局漫画第11话 镇魂街漫画100章 真人教师漫画图片大全图片大全图片 振动棒系列漫画 真人色情漫画全彩无码 真人bl漫画名字 真希姐妹漫画图片 真人家教邪恶漫画动态图 真人家教邪恶漫画动态图 振动棒系列漫画 振动棒系列漫画 真人邪恶全彩无码漫画大全 真秘汤巡礼漫画 镇魂街漫画 可以看的 真人家教邪恶漫画 真人版bl漫画有哪些 真人漫画泡面全集 镇魂街漫画 停更 真人教师漫画图片大全图片大全 真人四次元漫画图片 真人家教邪恶漫画 真希姐妹漫画图片 真人漫画:旅途 真人家教邪恶漫画 镇魂街漫画100章 枕上替婚新娘漫画 振动棒系列漫画 真人邪恶全彩无码漫画