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
水富电话手机电话号码怎么查询快递水富顺丰速运电话双流快运电话号码顺德顺丰快递网点查询电话水富电话石湾邮政快递电话水富顺丰速运电话收货人电话查快递石狮龙湖邮政局电话顺德龙江煤气电话水富顺丰速运电话石狮龙湖邮政局电话是多少顺德龙江煤气电话双流快运电话石狮龙湖邮政局电话石湾邮政投递电话号码顺德电话是多少顺德顺丰快递网点查询电话双牌石中通快递电话手机查顺丰单号查询电话顺德电话是多少收货人电话查快递双鸭山市邮政物流电话顺德盛辉物流网点查询电话世界各国 电话 代码顺德盛辉物流网点查询电话双鸭山市邮政物流电话双牌石中通快递电话石滩圆通快递电话武朝妖魔横行,天帝下令肃清人界妖邪,司法仙官林墨阳奉命除妖。 抓妖怪,谈恋爱。 笑看天地间掀起这场巨大波澜,芸芸众生万般命,一剑出鞘定乾坤!被废、被贬、惨死? 李承乾表示,这个三连击套餐,小爷不吃。 二十一世纪的理工男穿越到大唐,成为太宗长子李承乾。 开局只有八岁,不能当太子,更做不了皇帝。 怒刷李世民的情绪值,放烟花帮李崇义追小姐姐,组团阳澄湖抓大闸蟹! 最最舒坦的是,还有七个漂亮姐姐宠着,要月亮不摘星星那种! 那还怕啥,果断上天啊!叶轩重生到高考一个月前 为了不让自己这个渣男伤害她的叶轩决定和她保持距离。 趁着这时候慕容雪没喜欢自己 叶轩准备透露点高考题目让她稳上青华 而自己去临安到时候天南地北,确没想到高考后看到她的录取通知书傻了眼一个普通的大学下午,越识州一觉醒来,发现所有人全部陷入了沉睡。本以为这只是一次突发事件,却不想从此全球入梦,夜夜进入相同的梦境,夜夜在恐怖梦境中死去,无人可以逃脱。只有在梦中活下去,解开一个个恐怖梦境,才能找到背后的真相。他不甘堕落,在这座城市生根发芽,认识了这个妩媚的女人,一步步走向美好。生于平凡家庭的夜蝉,屡遭背叛算计。 家人惨死,心上人病危。 自己最后落得个剜心而死的下场,殊不知却被恶魔看中。 当他绝处逢生立志修仙时,又逢巨变。 一路坎坷,昔日的好好少年早已消失不见。 机关算尽之下,更为不堪的真相暴露在眼前。 是选择今生挚爱逆天而行,还是获得天大机缘,顺应天道。 夜蝉该如何抉择呢? 趁着夜色我想呐喊,却又寂静无声。 我到底该是一缕风,还是一株草? 我只是想我是一缕风,不被世俗所束缚。可我终究是活的太过于理想化了,我只能是一株草,一株不被定义的草,一株早已腐烂的草,没有根茎,无法扎根,且哪儿也飞不去的草。 我想我早该抛弃我那不切实际的理想主义,好好睡一觉,天总会亮的。 因为没有人会在天亮时伤感。中星历1716年,太白和奥莉伴随天地间九彩虹光诞生,同时也惊动了大批高手甚至是仙神的注意,而无数势力的强者中竟然有很多人认识他们的前世,甚至为此等待了他们万年之久…… 前世的他们,光催耀目,几乎以自己的力量创造了当今世界的格局,面对这个复杂的世界,他们的转世重修能否击破命运的牢笼,成就无上的存在呢?我以凤凰之身斩尽恶人, 我以血肉之躯除尽杀戮。 少年出生在一个普通到不能再普通的小村子里,无奈世界残酷至极,人和人,村和村,城和城等处处矛盾频发,少年父母因一些原因而被杀害,少年只能眼睁睁的看着,他愤怒,他一定要报仇,除尽世间杀戮。仙灵降世,灵气复苏。 妖尊悟空惨被菩提老祖疯狂追杀,重创之际,利用仅剩神力,封锁火星之石隧道,化作一粒记忆碎片陨落…… 百年之后,飞落水球,成为了水球人类的大脑思维结晶,之前历史记录,书籍神话人物,都是该神的记忆,最后徒弟秦记展开了亿年的复仇计划……
全球倒数计时 末世:吾乃上将潘风! 我史上最快飞升者 乾坤阴阳图 被大人支配的世界 魔鬼崛起 僻仙道 夏商之际革个命 全球惊悚:我在诡秘世界玩嗨了 复仇启示录 震惊,我的视频通未来! 朝泗镇怪谈 星赐之缘 死亡游戏,饕餮盛宴 都市:天庭地府闯人间 马嘴不对牛头 离魄长安行 一世成仙 不朽道魂 七神乱罪 手机电话号码怎么查询快递单号 石桥子快递电话是多少钱 石湾邮政投递电话号码 顺德顺丰快递网点查询电话 手机电话号码怎么查询快递 寿光递速快递电话号码 石湾邮政投递电话号码 石狮龙湖邮政局电话号码 世界各国 电话 代码 石狮龙湖邮政局电话是多少 石门县 马进福 电话 石门县 马进福 电话 双峰申通快递电话 石桥子快递电话是多少钱 水富电话 顺德顺丰快递网点查询电话 石羊塘小学电话号码 手机电话号码怎么查询快递单号 手机打上海的座机电话号码查询 水富顺丰速运电话 石桥子快递电话是多少钱 水富顺丰速运电话 手机打上海的座机电话号码查询 顺德电话是多少 石狮龙湖邮政局电话 双峰申通快递电话 手机电话号码怎么查询快递单号 手机电话号码怎么查询快递 手机打上海的座机电话号码查询 世界各国 电话 代码 顺德顺丰快递网点查询电话 顺丰 常平镇快递电话 双流快运电话号码 水富电话 双鸭山市邮政物流电话 顺德盛辉物流网点查询电话 双流快运电话号码 石湾邮政投递电话号码 双鸭山市邮政物流电话 双流快运电话 顺德盛辉物流网点查询电话 石狮龙湖邮政局电话号码 双牌石中通快递电话号码 石羊塘小学电话号码 顺德龙江煤气电话 顺丰 常平镇快递电话 石门县 马进福 电话 顺德盛辉物流网点查询电话 双峰申通快递电话 石湾邮政投递电话 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 再见亚西兰 术创世之末日篇一 蓝色星徽我的荣耀 剑冲九霄之绝对领域 丘吉尔与日不落帝国 AG真人 亚星管理平台 亚星游戏官网 AG真人 百家乐官网 顺德龙江煤气电话 收货人电话查快递 双峰申通快递电话 手机打上海的座机电话号码查询 收货人电话查快递 双流快运电话 手机查顺丰单号查询电话 手机电话号码怎么查询快递单号 水富顺丰速运电话 世界各国 电话 代码 石滩圆通快递电话 双鸭山市邮政物流电话 石滩圆通快递电话 顺德龙江煤气电话 石狮龙湖邮政局电话是多少 双鸭山市邮政物流电话 石湾邮政投递电话 双峰申通快递电话 顺德顺丰快递网点查询电话 双牌石中通快递电话号码 双峰申通快递电话 石狮龙湖邮政局电话号码 双牌石中通快递电话 双流快运电话 石桥子快递电话是多少钱 双流快运电话 手机打上海的座机电话号码查询 顺德盛辉物流网点查询电话 手机打上海的座机电话号码查询 石湾邮政投递电话号码