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 in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically.

<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

p>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="span6">
        Level 1 column
        <div class="row">
            <div class="span3">Level 2</div>
            <div class="span3">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>

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>

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: 767px) { ... }
  /* Portrait tablet to landscape and desktop */
  @media (min-width: 768px) and (max-width: 979px) { ... }
  /* 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 hiding 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
肠痉挛可以贴暖宝宝吗宝宝突然说膝盖疼宝宝能吃迷你南瓜宝宝尿黄有味道百天的宝宝突然不吃奶了肠痉挛可以贴暖宝宝吗宝宝晚上几点吃钙最好宝宝能吃迷你南瓜宝宝头上摸着有疙瘩宝宝夏天洗冷水澡宝宝眉心干燥发红脱皮肠痉挛可以贴暖宝宝吗宝宝退烧后身上起水泡宝宝眉心干燥发红脱皮宝宝能吃迷你南瓜宝宝夏天洗冷水澡半岁宝宝低热的处理宝宝两天没有吃东西宝宝两天没有吃东西宝宝体检转氨酶偏高65宝宝头歪图片怎么纠正宝宝两天没有吃东西宝宝头上摸着有疙瘩宝宝讨厌奶嘴怎么处理百天的宝宝突然不吃奶了宝宝睡着放床上就醒宝宝尿黄有味道宝宝四个月不爱小便宝宝提高免疫力保健药宝宝退烧后身上起水泡叶天本想桃花源里隐居过着咸鱼般的生活,却意外被美女网红直播。 你以为他是医神?活人无数? 他代表月亮消灭你! 你以为他是影帝? 他赌石赢到手软! 神医妙手,黄金圣瞳,绝世杀神,校花终结者…… 这个主播的马甲有亿点点多!新人一枚,请多多支持,不喜勿喷魔尊李长风逃婚来到了人界,因贪恋人间美食被卷入一段段因果。 虎石台的月光,上个世纪末期一代人的回忆……身患绝症的叶文偶得太极拳的真传,并且觉醒了弘扬武学系统! 只要他用武学影响更多人,就能获得积分,兑换顿悟机会,获得各种高阶武学! 甚至,治好自己的病。 从此,叶文开启了他的练武直播! 拳震所有武林宗门,脚踏世间不服之人! 只有你想不到的招式,没有我治不了的高人! 所有人都要恭恭敬敬地,在键盘上叫一声“武神”。 叶文:“货真价实的太极拳要不要学?飞檐走壁的梯云纵要不要了解一下?不要?早晚你要跪地求着我要!” “叮,你的体质嫌你修为太弱,主动帮你修炼,恭喜你突破了!” “叮,你的体质嫌你天赋平平无奇,帮你升级到万古无一的仙品天赋!” “叮,你的体质觉得你眼神不好使,帮你开启绝世神通,六道仙轮眼!” “叮,你的体质很暴躁,嫌你修为还是太弱,一言不合就截取世界本源助你修行,恭喜你又突破了!” 叶青穿越异界,觉醒万古最强妖孽体质,躺着就能变强,一路无敌横扫,威临诸天万界,镇压无数天骄! 仙庭圣女:“天呐,世间为何会有如此妖孽?这还让不让人活了!” 人族圣子:“自从我认识叶青,才知道什么叫天骄!都别拦着我,以后叶青就是我老大了!” 魔族魔女:“叶青这家伙,为何如此优秀?” 叶青:“其实我真的没有开挂啊!体质,咱求你低调一点行不行?”曾几何时,一人便为一军,一手诡异的刀法神乎其神,率百余将士,可敌千军万马!战火纷飞,一柄长刀可刺破苍穹,一面旗帜压境攻城!留下的传说无人不知无人不晓,当时的洛烨,是笼罩整个战场的黑暗。   他失去了理智,手握长刀在人群中穿梭,红光四起,等回过神来时,血,已经染红了大地。   一年前...万年之前,天元和天魂两大神王飞升。 万年之后,黑渊降临,两大神王陨落重生。 重生后,两大神王再次登顶,冲击更高的境界! 区区神王不能满足我的要求!我要登顶神帝!我要成为这万界之主! 巨变来临,新一轮的主境强者即将出世,一路逆袭,任我修为再低,这天也不是我的对手! 重生在架空的大汉,刘贺一觉醒来,成了大汉的皇帝,原以为是穿越者的福利,殊不知…… 与历史上的汉废帝一样,刘贺将面对一千一百二十七条罪状,黯然离场! 环视群臣,刘贺表示心好累。 左相梁冀,右相蔡京,帝师司马懿,太师董卓,吏部尚书严嵩,刑部尚书来俊臣…… 武将有:大将军何进,义子其一安禄山,另一吕布,还有朱棣,孙权,鳌拜,以及四方将军赵括、马谡、邢道荣、李广利。 以及分封各处的异姓王:吴三桂、孔友德、韩信等…… 后宫阵容更是豪华:东宫太后赵姬,西宫太后吕雉,皇后芈月,贵妃杨玉环,昭仪苏妲己,才人武媚…… 以及历史上祸国乱政必不可少的太监团队:东厂曹正淳,西厂雨化田,中车府令赵高,十常侍张让等…… 更兼外敌如大元、大满等虎视眈眈。 境内诸如黄巾军、梁山等反贼势力丛生。 天下会、天门等武林势力与护龙山庄朱无视等对峙…… 地狱开局,刘贺有心杀敌,无力回天! 幸好,天命加身,得系统辅助,刘贺将借此,步步为营,成就千古暴君! 仰望仙道尽头,你我的命运在何方? 纵观古史,谁为棋手谁为棋? 在这一场浩瀚无边的仙道棋局中,多出的一子,究竟是棋手还是棋子?
大秦:朕都皇帝了,你让我造反? 看,那是我为你编织的梦 魔亦通天 系统惩罚我当NPC 神眼赘婿 我在都市中重生 末世:我有一对星辰眼 我的老师竟然是黑客 孝与不孝生死绕 酒帝,我凭实力吃软饭 我的神级钛合眼 那些年的深刻记忆 C界 红尘借道 绝世云尊 逆仙魔尊 关东诡谈记 天陨六星 酆都印 诡谈撰 宝宝睡觉头出汗后颈凉 宝宝夏天很会流汗是什么原因 半岁宝宝低热的处理 宝宝两天没有吃东西 宝宝睡觉头出汗后颈凉 宝宝睡着时老是干呕是怎么回事 吃了快克可以要宝宝吗 宝宝吐奶会不会饿 宝宝睡着放床上就醒 宝宝退烧后身上起水泡 宝宝头上摸着有疙瘩 宝宝头上摸着有疙瘩 宝宝讨厌奶嘴怎么处理 宝宝夏天洗冷水澡 宝宝天天吃火腿肠好吗 百天的宝宝突然不吃奶了 吃了快克可以要宝宝吗 宝宝睡着放床上就醒 宝宝头歪图片怎么纠正 肠痉挛可以贴暖宝宝吗 宝宝夏天很会流汗是什么原因 宝宝能吃迷你南瓜 宝宝突然说膝盖疼 宝宝满月后粘人 宝宝吐奶会不会饿 宝宝讨厌奶嘴怎么处理 宝宝睡着放床上就醒 宝宝突然说膝盖疼 宝宝头歪图片怎么纠正 宝宝睡着放床上就醒 宝宝两天没有吃东西 宝宝夏天很会流汗是什么原因 宝宝尿黄有味道 肠痉挛可以贴暖宝宝吗 宝宝讨厌奶嘴怎么处理 百天的宝宝突然不吃奶了 宝宝能喝麻?S 吃了快克可以要宝宝吗 宝宝讨厌奶嘴怎么处理 宝宝能喝麻?S 百天的宝宝突然不吃奶了 宝宝兔唇在几周形成? 宝宝体检转氨酶偏高65 宝宝头发可以做什么 宝宝满月后粘人 宝宝夏天很会流汗是什么原因 宝宝头上摸着有疙瘩 宝宝尿黄有味道 宝宝提高免疫力保健药 宝宝晚上几点吃钙最好 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 独狼道 纯屌丝逆袭 我的修仙模拟器 废体乱仙途 马拉快跑 AG真人 亚星管理平台 亚星游戏官网 AG真人 百家乐官网 宝宝突然说膝盖疼 宝宝晚上发烧37.7 宝宝睡着放床上就醒 宝宝讨厌奶嘴怎么处理 宝宝尿黄有味道 宝宝讨厌奶嘴怎么处理 宝宝睡着时老是干呕是怎么回事 宝宝体检转氨酶偏高65 吃了快克可以要宝宝吗 宝宝头上摸着有疙瘩 宝宝头发可以做什么 宝宝能吃迷你南瓜 宝宝体检转氨酶偏高65 宝宝能喝麻?S 宝宝吐奶会不会饿 宝宝退烧后身上起水泡 宝宝能喝麻?S 宝宝睡着放床上就醒 宝宝兔唇在几周形成? 宝宝晚上几点吃钙最好 宝宝晚上几点吃钙最好 宝宝眉心干燥发红脱皮 百天的宝宝突然不吃奶了 宝宝头发可以做什么 宝宝讨厌奶嘴怎么处理 宝宝体检转氨酶偏高65 宝宝提高免疫力保健药 宝宝头上有精子味 宝宝夏天很会流汗是什么原因 宝宝退烧后身上起水泡