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
1岁多宝宝突然不吃母乳宝宝发烧湿毛巾绑腿宝宝好大适宜和豆浆睡前宝宝听故事宝宝碰后脑偶尔吐1岁多宝宝突然不吃母乳宝宝哮喘性支气管炎严重吗宝宝好大适宜和豆浆宝宝下巴摔缝5针注意什么宝宝鼻子中间有凹痕小宝宝摔到头多久会表现出来1岁多宝宝突然不吃母乳照X光后可以怀宝宝吗小宝宝摔到头多久会表现出来宝宝好大适宜和豆浆宝宝鼻子中间有凹痕宝宝胡萝卜过敏11个月宝宝能喝多少奶粉11个月宝宝能喝多少奶粉五个月宝宝呕吐做造影六个的宝宝咳嗽吃什么药再好宝宝身体发热脚凉两个半月宝宝用劲时脚趾内扣宝宝11个月叫名字不知道回头宝宝碰后脑偶尔吐一岁半的宝宝指甲很薄怎么办睡前宝宝听故事吃乳果糖宝宝肚子会疼吗三岁宝宝老是不回答问题照X光后可以怀宝宝吗赢飞羽穿越大秦,开局年仅五岁半。 还好身携熊孩子系统,只要不断搞事就能获得奖励。 “什么?系统你说我爹是秦始皇?” 当得知自己竟是嬴政流落在外的第二十四子时,赢飞羽惊了。 为了大秦不再二世而亡,也为了自己的小命,赢飞羽只好出手为嬴政逆天改命,导演沙丘宫之变! 嬴政:“好孩子,跟朕回宫,宫里好吃的多的很!” 小正太:“有泡面吗?” 当代大儒:“小公子,咱们今天学四书!” 小正太:“你瞧瞧我倒背的如何?” 第一武将:“小公子,臣来教你几招!” 小正太:“还是我先给你表演一个空手舞石狮子吧!” 嬴政:“赵佗造反,谁去平定?” 百官:“小公子文能提笔安天下,武能马上定乾坤!” 小正太:“别急!容我先练一只特种兵!” 原本只想作妖混个系统奖励,不曾想竟被秦始皇当做接班人培养! 天道之下的人,在追求着天道。只是,天道又是什么?人在追求什么?红衣,黑影,传承……父母神秘失踪,只留下四样东西: 1封信、1万块钱、1个扳指,1瓶老酒。 “小烨:18岁前,不许喝酒,不许找我们。” 今晚过后,苏烨就满18岁了。 喝不喝那瓶酒呢? 喝了之后将会发生什么? 这是苏烨面临的两个问题!五代十国,群雄逐鹿,叶海棠与上官雨虹在江湖中历经亲情、友情、爱情的考验,无数次面对忠诚与背叛的抉择,去寻找属于她们自己的人间道。王侯将相,宁有种乎? 泱泱大晋,达官显赫,人才无数。 但我罗明秋亦能以蝼蚁出身,搅动风云。 文官之首:“燕雀安知鸿鹄之志哉?吾亦不知罗明秋!” 镇国将军:“这一扎子读书人中,某最服的就是罗侯爷。” 真龙:“这龙椅,明秋君比我更合适!” 皇后:“与君相见恨晚,若不然,这后宫之主不当也罢……” 且看一介书生,如何拨弄这天下棋盘…… “五年...五年...,你知道这五年我怎么过的吗?你知道吗?” ...... 穿越到异世界的墨凡,本以为靠着系统能够走向人生巅峰,迎娶白富美。 却不曾想,他的系统竟然因为没电关机了。 这一关机就是五年...  常定宇穿越民国,成为当地乡绅子弟,激活《世界首富》系统,并青春永驻,容颜一直停留在了二十出头。 但他无心壮大个人财富,反而创办大学,抗击奴人,屡立奇功,身上伤疤无数。   最终因为系统原因,常定宇战争尚未结束就直接进入了活死人的状态,直到百岁生日这一天才苏醒过来。   一日,常定宇骑着电动车和大妈相撞,被大妈诬陷碰瓷。   围观的路人纷纷对他指指点点。   “年纪轻轻的干什么不好,竟然也学老人碰瓷,一个大小伙子,你害臊不害臊?”   常定宇非常气愤,他从来没被人这么冤枉过,想上前理论,结果被大妈扯坏了衣服。 一身伤疤触目惊人,众人都傻了……穿越到大乾王朝的陈河,入赘叶家,本想着这辈子要不做个赘婿吧。   混吃等死算了。   谁想到新婚妻子娇艳如花,奈何天生体弱,红颜多薄命。   一本《伤寒论*小青龙汤》救了新婚的妻子。   一本《本草纲目》本奉为万世医典。   《神农本草经》济世悬壶,引得天下医道追逐。   多年以后,看着自己的济贤堂开遍大乾,陈河本想着这辈子也就这样过吧,娶个七八房媳妇,生个十几个娃,但没想到大乾内乱。   一纸诏令直达应天。   宣:陈河入宫!时间长河若有尽头,我只看一眼,便回来找你。 哪怕武道极致,哪怕商道极致,只为那一句承诺。 什么《经商十年算法》,什么《武道十段成神》。 与我而言,倘若与你无关,便是浮云。
浮世短篇小说集 直播抓鬼:从鬼差升职到酆都大帝 死神的名义 万界至尊 重生异世 我要不断进化 风暴战纪 疑与智斗 上仙来自20亿年后 伍:登神纪 活下去,活着 音乐道士 无妄变 平平淡淡的我重生啦 原来我老婆会处理异常事件 血色的路途 天赐使徒 无双殿 一个陌生男孩的来信 承包商:D区往事 闻西的故事 三岁半宝宝的学习内容 3个月宝宝支气管炎症状 宝宝胡萝卜过敏 11个月宝宝能喝多少奶粉 三岁半宝宝的学习内容 男人爱宝宝 宝宝脸痒起红疙瘩 宝宝尿尿痛用什么药 一岁半的宝宝指甲很薄怎么办 照X光后可以怀宝宝吗 两个半月宝宝用劲时脚趾内扣 两个半月宝宝用劲时脚趾内扣 宝宝11个月叫名字不知道回头 宝宝鼻子中间有凹痕 宝宝胎动浮动轻正常吗 宝宝碰后脑偶尔吐 宝宝脸痒起红疙瘩 一岁半的宝宝指甲很薄怎么办 六个的宝宝咳嗽吃什么药再好 1岁多宝宝突然不吃母乳 3个月宝宝支气管炎症状 宝宝好大适宜和豆浆 宝宝发烧湿毛巾绑腿 宝宝身体发热脚凉 宝宝尿尿痛用什么药 宝宝11个月叫名字不知道回头 一岁半的宝宝指甲很薄怎么办 宝宝发烧湿毛巾绑腿 六个的宝宝咳嗽吃什么药再好 一岁半的宝宝指甲很薄怎么办 11个月宝宝能喝多少奶粉 3个月宝宝支气管炎症状 睡前宝宝听故事 1岁多宝宝突然不吃母乳 宝宝11个月叫名字不知道回头 宝宝碰后脑偶尔吐 宝宝初次添加蔬菜 宝宝脸痒起红疙瘩 宝宝11个月叫名字不知道回头 宝宝初次添加蔬菜 宝宝碰后脑偶尔吐 三个月宝宝一天拉八次像水一样 五个月宝宝呕吐做造影 9个月宝宝能吃香蕉吗 宝宝身体发热脚凉 3个月宝宝支气管炎症状 两个半月宝宝用劲时脚趾内扣 睡前宝宝听故事 三岁宝宝老是不回答问题 宝宝哮喘性支气管炎严重吗 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 耐普罗德之书 我往山上去 寂寞不说爱 重生之拯救国足 南平滋味 亚星管理平台 葡京官网 AG真人 亚星管理平台 万利官网 宝宝鼻子中间有凹痕 宝宝身体发热脚凉 宝宝下巴摔缝5针注意什么 五个月宝宝呕吐做造影 宝宝好大适宜和豆浆 宝宝胎动浮动轻正常吗 三岁半宝宝的学习内容 宝宝尿尿痛用什么药 宝宝哮喘性支气管炎严重吗 三岁半宝宝的学习内容 男人爱宝宝 三岁半宝宝的学习内容 宝宝身体发热脚凉 男人爱宝宝 三岁宝宝老是不回答问题 宝宝碰后脑偶尔吐 宝宝下巴摔缝5针注意什么 9个月宝宝能吃香蕉吗 宝宝胎动浮动轻正常吗 3个月宝宝支气管炎症状 三个月宝宝一天拉八次像水一样 宝宝尿尿痛用什么药 宝宝初次添加蔬菜 宝宝碰后脑偶尔吐 3个月宝宝支气管炎症状 男人爱宝宝 两个半月宝宝用劲时脚趾内扣 宝宝脸痒起红疙瘩 1岁多宝宝突然不吃母乳 9个月宝宝能吃香蕉吗