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
济南长途汽车站北中山汽车总站是哪一个从范县到日照汽车站漳州到珠海汽车票网上订票宜宾至眉山汽车票济南长途汽车站北渔阳关镇到天门汽车票从范县到日照汽车站杭州至兴化的汽车岳阳到平江做汽车多久?濮阳到南乐的汽车最晚从范县到日照汽车站布吉长途汽车站时刻表濮阳到南乐的汽车最晚嘉善到阜南汽车时刻表岳阳到平江做汽车多久?成都到左贡汽车时刻表龙南老汽车站怎么导航宜宾至眉山汽车票清河城到临沂的汽车广东省长途汽车站 电话是多少龙南老汽车站怎么导航杭州至兴化的汽车江门公共汽车30南京南站到灵璧汽车商州到昭通有汽车吗?南京南站到灵璧汽车江门公共汽车30清河城到临沂的汽车布吉长途汽车站时刻表饥肠辘辘,卖儿卖女,饿死街头,这是百姓。 满嘴流油,肥头大耳,仆人成群,这是商人。 锦衣华服,高高在上,满心算计,这是官老爷。 剑指之处,目之所及,皆可抢夺,这是皇帝。 这世界有的只有无尽的战乱,瘟疫,天灾,剥削,压迫。 【全网最火爆的玄幻小说】 说起天赋,不算妖孽级,可武技秘技,皆可自学成才。论背景,任凭你有万千大军,但定不敌我。我是谁?天下众生视我为溟渊,却不知,我以溟渊成邪神。 小说讲述了家族遭受打击,将后辈传回了15年前的七界星系,被视为最有潜力的七位少年,为了证明自己,夺回家族荣誉,而从一个幽暗的世界 最强宗门内门弟子成长为这片星系顶天立地的人物。随着月球人的皇室后代纳尔斯逃到地球,刘宣与安晓天的生活发生了改变,刘宣选择接纳尔斯的灵魂,成为了第一个捍卫者成员蓝面人,安晓天也因战斗中受伤而接受了与烈鹰装甲的合体,成为烈鹰侠。纳尔斯告诉了他们关于刹神者的可怕秘密,两人开始紧急组建捍卫者联盟,寻找中国其他几位身怀绝技的英雄,以对抗刹神者的入侵。除了他们两人,还有中国最强狙击手梦魇,双臂力大无穷的神拳,甚至经过千年修炼后的孙悟空,等等。一场决定人类命运的战争,一触即发。 诸天万界,融融大世。 万族争霸,血乱弥天。 一本封妖录,一条封妖路。 少年起于荒界,封妖万界,万古称尊。孟婆说我在阳间的寿命没超过24小时,不给予办理投胎业务。 而我当了十八年的鬼,终于等来家里给我烧了一间小卖部。 我意外发现这件小卖部通阳间,可以从阳间进货,拿到阴间来卖。 从此以后我便就做起了阴阳两界的生意,叱咤阴间。 和乔老爷一起卖手机,和扣比一起打篮球,但阎王竟然不要我投胎?此作品是根据生活加以想象,构思出来的简短文集,一个章节就是一个故事,文章观点仅是个人理解,有冒犯之处或者情节雷同,请多包涵,谢谢一场大地震,让返祖狂潮席卷全球。 动物、植物、人类,都在这场灾变中,变回自己祖先的模样。 武者、修士、妖鬼、仙人、恐怖的鸿蒙古兽…… 返祖的次数越多,返祖的祖先越古老、强大。 就在所有人都好奇会返祖成哪位祖先时。 李响惊讶发现,自己可以主动选择返祖对象。 第一次返祖,别人都觉醒武者祖先,李响却选择了武侠时代最后一名炼气士——张三丰,以内家拳、太极剑、丹道,震撼世人。 接着是第二次返祖,第三次返祖…… 直到第九次返祖,李响看着迎面走来的鸿钧虚影,露出了无比灿烂的笑容。人活着无论干什么都挺困难。即使坚守不招惹人的原则都躲不过被人刁难。即使是对的,在金钱和权力的逼迫下变成了错的。人活着是最痛苦的事了,压抑的怒火早已烧毁了心脏。人需要发泄的地方,请来疯狂直播间。神话神兽,寻得九影,路途艰辛,似已西游记淮南大学历史系研究生许攸因意外卷入命案,与刑警支队队长喻归远相识,旧案未破,新案叠出,性格迥异的两人也在案件的不断侦破下,从初识的看不惯到彼此理解,成为惺惺相惜的挚交。
猎魔夜人 幸存者的獠牙 天道阴阳先生 玄幻:我真的不是绝世高手 从纨绔开始 黑色乐园 路走尽了怎么办 无:我也不知道在写什么! 他们修仙那我开挂! 荒野大镖客之死亡救赎 悍浪啸苍穹 异世界的传奇之旅 壶内老婆已满 ,派蒙禁入! 灵珏点将录 修仙犯法么 梦尽星河 蜀山签到三千年,出关陆地剑仙 黄昏芝初 天机十八策 小神医之灵瞳 福州到罗源 汽车票 贵阳到茂名的汽车站时刻表 成都到左贡汽车时刻表 宜宾至眉山汽车票 福州到罗源 汽车票 枣庄到南京坐长途汽车多长时间 成都到左贡汽车时刻表 淮阳县检测汽车去那啊 商州到昭通有汽车吗? 新乡市到平顶山汽车 平阳汽车站定票 平阳汽车站定票 海阳北到乳山汽车时刻表 贵阳到茂名的汽车站时刻表 济南长途汽车站北 宜宾至眉山汽车票 公明汽车站有车到龙见田吗? 商州到昭通有汽车吗? 贵港汽车总站有去开平 从范县到日照汽车站 贵阳到茂名的汽车站时刻表 从范县到日照汽车站 贵港汽车总站有去开平 龙南老汽车站怎么导航 岳阳到平江做汽车多久? 海阳北到乳山汽车时刻表 福州到罗源 汽车票 中山汽车总站是哪一个 贵港汽车总站有去开平 商州到昭通有汽车吗? 宜宾至眉山汽车票 泰州到宁波汽车票网上订票 漳州到珠海汽车票网上订票 济南长途汽车站北 江门公共汽车30 南京南站到灵璧汽车 漳州到珠海汽车票网上订票 成都到左贡汽车时刻表 海阳北到乳山汽车时刻表 嘉善到阜南汽车时刻表 南京南站到灵璧汽车 淮阳县检测汽车去那啊 遂平火龙庙在汽车站吗 公明汽车站有车到龙见田吗? 濮阳到南乐的汽车最晚 泰州到宁波汽车票网上订票 平阳汽车站定票 南京南站到灵璧汽车 海阳北到乳山汽车时刻表 萧山到乐清虹桥汽车 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 元宇宙管理局 全球末日:庇护所无限升级 诸天副本:开局就是无敌潜力 关于我和我室友们的日常 万族崛起之龙族崛起 快连下载 亚星游戏官网 亚星官网 欧博官网 亚星管理平台 福州到罗源 汽车票 济南长途汽车站北 广东省长途汽车站 电话是多少 龙南老汽车站怎么导航 海阳北到乳山汽车时刻表 布吉长途汽车站时刻表 布吉长途汽车站时刻表 遂平火龙庙在汽车站吗 济南长途汽车站北 江门公共汽车30 宜宾至眉山汽车票 从范县到日照汽车站 淮阳县检测汽车去那啊 成都到左贡汽车时刻表 海阳北到乳山汽车时刻表 漳州到珠海汽车票网上订票 萧山到乐清虹桥汽车 遂平火龙庙在汽车站吗 广东省长途汽车站 电话是多少 海阳北到乳山汽车时刻表 江门公共汽车30 新乡市到平顶山汽车 新乡市到平顶山汽车 遂平火龙庙在汽车站吗 遂平火龙庙在汽车站吗 枣庄到南京坐长途汽车多长时间 江门公共汽车30 济南长途汽车站北 漳州到珠海汽车票网上订票 泰州到宁波汽车票网上订票