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
高密市超越驾校教练赤壁万通驾校校长图片高桥长盛驾校电话调侃驾校教练的顺口溜东阿兴阿驾校a3高密市超越驾校教练当驾校教练累吗高桥长盛驾校电话赤壁万通驾校大楼东丰县通达驾校校长东丰通达驾校电话号码高密市超越驾校教练逗驾校教练的顺口溜东丰通达驾校电话号码高桥长盛驾校电话东丰县通达驾校校长成都d照驾校东阿兴阿驾校a3多少钱东阿兴阿驾校a3多少钱大同驾校科三灯光语音赤壁万通驾校考场图片东丰程翔驾校电话赤壁市万通驾校地址大千驾校c2东阿兴阿驾校a3大连驾校教练证怎么考调侃驾校教练的顺口溜大连万通驾校金教练大同驾校科三灯光语音逗驾校教练的顺口溜十三年前,李致在城郊梨花树下捡到一只垂死白狐。 十三年后,他开始被一个漂亮温婉的落难小姐倒追。 月夜之下战幕拉开。 李致翻手间剑光纵横雷霆天落,“我家夫人温柔贤惠娇贵可人,知冷热擅烹食……” 姜璃弹指间邪魔俯首山河崩坏,“我家相公谦谦君子文弱书生,温逊有礼好脾气……” 反派“……”穿越平行世界,参加选秀综艺,商献毫无意外成为偶像。 粉丝:明明可以靠脸吃饭,却偏偏靠才华,他重新定义了偶像! 商献:我不想做偶像啦,抄歌没有一点挑战性,想尝试去演戏! “人太帅,演什么都画风突兀,还是专心唱歌吧!” “这垃圾演技,安心当个偶像吧,演戏不适合你!” “演的什么鬼!差评!发首新歌我们才能原谅你!” ———— 多年后,当商献入选《时代周刊》年度风云人物,人们才恍然惊觉,这个偶像并不简单…… 年度风云人物评语:他创造了一个时代,在各种意义上!蓝星, 赤乌系唯一已知文明,在宇宙中被视为资源最为丰富的星球之一。即便大多数文明会因为赤乌系外围的危险放弃掠夺,但依然有少数文明不远万里费尽心机前来侵略。曾经来到过蓝星的神给蓝星留下了基因武器,而这些基因的继承者将在这个世纪,展示出真正的实力......“那个,学姐,我最近心里总是砰砰的感觉,请问我是不是得什么不好的病了?” “你说的那个砰砰的感觉,在哪里,对谁都是一样的吗?” “嗯,好像就是和同社团的前辈在一起的时候,有这种感觉……” “好!那就去告白吧!” “唉———”夏牧穿越后秒变孤儿,紧接着全村被屠,侥幸逃脱。 身处陌生王朝的农民孤儿,前途未卜,可谓地狱开局。 好在他身怀“托梦成就系统”,只要完成成就便能召唤华夏千年的人才为己所用。 霸王,关二爷,岳鹏举,武媚娘……还不快到碗里来! 当他成为一州霸主,准备横扫天下时,他震惊的发现,原来“天选之子”不止他一人……一名普通职业经理人,意外魂穿到民国,成为一名军统特工,没有金手指,凭借前世的信息,依靠自己的知识并不断地学习、成长,在风云变幻的时代中为国家,为民族贡献自己的力量,并创造了一段段精彩的特工传奇……受气包苏凡意外获得神医传承,从此悬壶天下,济世救人,走上人生巅峰。 林筱然:“受气包,我脖子有些酸了!” 苏凡:“老婆,我这就帮你捏捏,你千万别动气!” 见苏凡如此乖巧,林筱然眼中满是笑意,成为绝世医仙又如何?还不是要乖乖听本小姐的话? 苏凡欲哭无泪,自己这辈子怕是躲不开这小魔女的蹂躏! 【同人+无敌+后弓+系统+爽文】 由于非法穿越的主角过多,导致各大世界中女神的属性产生了妙不可言的变化。 现,穿越协会决定派遣一名工作人员对各大世界的女神质量进行检查,不合格者,一律打包带走…… 我叫侯龙涛,是一名普通的猪肉质检员,每天的任务就是检查猪肉质量是否合格。这种日子我已经持续了三年,直到有一天……现代佣兵周文意外魂穿到民国学生周文身上。他利用穿越带来的一颗佛珠的神奇功能,再加上后世带来的经验、知识和技能。打造了一只武功高强、军事技术顶尖的佣兵团队。 他带领这支佣兵团,历经中原大战、淞沪抗战、称雄上海滩。装备了当世最先进的各种武器,最后投身于伟大的抗日战争中。带着兄弟们杀鬼子......“我的双刀早已饥渴难耐!”“远哥,有些事情还是应该有个度,过量的话,对身体不好……,还不如去释放一下!”身披守护天使,肩扛狂徒铠甲。左手饮血剑,右手无尽之刃。横扫丧尸世界无敌手,就问一声还有谁?
神的单奏 这都是你们逼我的 拳破魔域 齐天大圣再战西游 戏江游湖 九龙剑尊 九子神兵 罚恶者 异世界:我的吸血鬼老师 我们的神族 刍狗的逆袭 酒帝,我凭实力吃软饭 魔幻西游释厄记 阴魂书 我要做小区主人 龙啸苍途 封神之位 逆万道 超级智能修仙系统 白昼流星 从化棋杆长盛驾校 东丰通达驾校校长电话 成都d照驾校 东阿兴阿驾校a3多少钱 从化棋杆长盛驾校 大连万通驾校金刚教练 赤壁陆水驾校在哪里 东莞市广仁驾校 桑园 大连驾校教练证怎么考 逗驾校教练的顺口溜 赤壁市万通驾校地址 赤壁市万通驾校地址 大千驾校c2 东丰县通达驾校校长 丹东驾校收费是多少 东阿兴阿驾校a3 赤壁哪个驾校的教练好 大连驾校教练证怎么考 赤壁万通驾校考场图片 高密市超越驾校教练 东丰通达驾校校长电话 高桥长盛驾校电话 赤壁万通驾校校长图片 东丰程翔驾校电话 东莞市广仁驾校 桑园 大千驾校c2 大连驾校教练证怎么考 赤壁万通驾校校长图片 赤壁万通驾校考场图片 大连驾校教练证怎么考 东阿兴阿驾校a3多少钱 东丰通达驾校校长电话 调侃驾校教练的顺口溜 高密市超越驾校教练 大千驾校c2 东阿兴阿驾校a3 给驾校教练顺口溜 赤壁陆水驾校在哪里 大千驾校c2 给驾校教练顺口溜 东阿兴阿驾校a3 东莞市好方向驾校 大同驾校科三灯光语音 赤壁哪个驾校的教练好 东丰程翔驾校电话 东丰通达驾校校长电话 赤壁市万通驾校地址 调侃驾校教练的顺口溜 大庆万宝阳光外职驾校 当驾校教练累吗 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 魔祖出世,诸神避让 斩天丹帝 重生之超能力者的复仇 镇天神帝 重生之我是大主播 亚星管理平台 澳门葡京官网 葡京官网 亚星管理平台 万利官网 东阿兴阿驾校a3 赤壁万通驾校大楼 东丰县通达驾校校长 大连万通驾校金教练 赤壁陆水驾校在哪里 给驾校教练顺口溜 给驾校教练顺口溜 赤壁市万通驾校地址 赤壁万通驾校大楼 成都d照驾校 大连万通驾校金刚教练 赤壁万通驾校考场图片 高密市超越驾校教练 大庆万宝阳光外职驾校 东丰通达驾校校长电话 从化棋杆长盛驾校 东阿兴阿驾校a3 东莞市广仁驾校 桑园 高桥长盛驾校电话 赤壁陆水驾校在哪里 东丰通达驾校电话号码 高桥长盛驾校电话 大连驾校教练证怎么考 赤壁市万通驾校地址 赤壁市万通驾校地址 当驾校教练累吗 成都d照驾校 逗驾校教练的顺口溜 从化棋杆长盛驾校 大庆万宝阳光外职驾校