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
东营去威海的汽车玉溪到曲靖市汽车票东营去威海的汽车长沙汽车南站到长沙火车站公交海门到南通汽车票多少时间张家界到沅江的汽车站时刻表江北机场的汽车站在哪里坐韶关2005年汽车数量普宁汽车站在哪从济南到滨州的汽车时刻表畅途可以退汽车票吗东营去威海的汽车长沙高铁站到隆回的汽车站时刻表兴义 重庆 汽车时刻表韶关2005年汽车数量从济南到滨州的汽车时刻表永修到乐平的汽车丹阳至黄山汽车时刻表查询丹阳至黄山汽车时刻表查询常州 高港汽车时刻表张家界至常德的汽车站时刻表丹阳至黄山汽车时刻表查询普宁汽车站在哪淮安到北站汽车时刻表海门到南通汽车票多少时间从泰安到枣庄的汽车站时刻表长沙汽车南站到长沙火车站公交淮安到北站汽车时刻表常州 高港汽车时刻表长沙高铁站到隆回的汽车站时刻表这个世界,儒墨法道,百家争鸣 苏文以为来到以文乱法,以武犯禁快意恩仇的大争之世 没想到却被诡秘所支配…… 一觉醒来陈文发现自己穿越了!然而青梅竹马准未婚妻因为家中负债,被逼嫁给隔壁地主!为了挽回心爱的她,为了做一个富贵闲人,陈文不得不整出一个又一个的小发明,经商致富,种田发展,一步步做大做强,再创辉煌!一场末世浩劫突然来临,蓝星炸了。 死亡,亦是新生。 然而,噩梦才刚刚开始。 一轮轮的末世危机,不断来袭。 想要活下去,运气、智慧、实力、勇气缺一不可。  何为魂修?修魂逆命,与天争。 ...... “你可想好?八目玉属性丶能力各不相同。若是选择震玉,那么日后也不可再更改。” “前辈,我想好了。” ...... 天元大陆,姜芜忧历经种种磨难,带着八目玉之一震玉,踏上了修炼旅途。在这充斥着东西方玄幻色彩丶妖兽横行的世界中,卷入一场场阴谋和争斗。自此,再无宁日。 ...... 一入魂修深似谷,再回眸时已无路。拥有着赚100万梦想的祥子,在现代社会中经历A股的各种折磨,以及社会病毒带来的困难......  李乘风穿越到一个妖魔横行的世界,成为青城山的一个守山人。   奈何他没有灵根无法修炼,只能安安分分做一个普通人。   但是有一天,他的系统突然变异了,从此成了一个令一众妖魔闻风丧胆的得道高人……   这妖怪也太弱了,我都没有出剑呢,怎么就死了。   我养的一条狗,居然是横扫妖界的一方妖王。   我池塘里的乌龟,竟然蜕变成了洪荒神兽。   之前跟我下棋的老头子,最后竟然成仙了。   还有那个最喜欢听他吟诗作对的漂亮姐姐居然修仙界第?仙?。   知道这些真相之后,李乘风开始怀疑人生:   我该不会真成为绝世高手了吧? 在超一线城市当贫困户怎么办? 别慌,本系统带你装逼带你飞! 秦寿:系统,你不是人,但你是真的狗啊! 系统:嗯哼,你最近有点飘啊!信不信本大爷解绑? 秦寿:系统爸爸我错了! ………………………穿越到了一个全新的异世界, 在这个剑与魔法交织的世界里, 主角吕越点燃自己的斗气, 拳打异族,脚踢鬼神, 在血与火的试炼中, 吕越逐渐走向无敌很久很久以前,有一座山,名为葬灵山;葬灵山的西边有条渊,名为无相之渊;无相之渊的西边,有一座学府,名为真武院;而故事,则要从葬灵山东边的那座凌天帝国讲起……神魔的游戏,养蛊人类,是举刀拿剑逆战万族,还是低眉俯首甘为奴仆,普通人的野望,你我是否都幻想过打破秩序,生与死,血与泪,离别与重逢,种种的选择,这是一部笑中含泪的作品,且看普通人如何末世中挣求活,选择自己的人生。
埋骨何须桑梓地 签到万年,身份被美女徒孙曝光了 公子风流 君临地球玩逆袭 剑寻兮 西游:人在地府,朝九晚五 异世浮生绘 冰山美女的最强兵王 一刀一剑破荒唐 女友的游戏实力竟然超强 不装了,我就是宁采臣! 修真界旅游日常之度日如年 血饮狂魔 假如给你一个亿 神豪老爸:出生即是巅峰 奥特胶囊系统 奇峰天邑 从落魄太子到永夜君王 天武山河印 mere trash 扬州汽车客运西站app 杭州至柯桥汽车 永修到乐平的汽车 海门到南通汽车票多少时间 扬州汽车客运西站app 高淳到无锡的汽车票 阳原到石家庄汽车车表 自贡到宁波汽车票网上订票 从泰安到枣庄的汽车站时刻表 长沙高铁站到隆回的汽车站时刻表 普宁汽车站在哪 石家庄北到衡水的汽车时刻表 通海到蒙自汽车时刻表 杭州至柯桥汽车 张家界到沅江的汽车站时刻表 海门到南通汽车票多少时间 阳原到石家庄汽车车表 从泰安到枣庄的汽车站时刻表 张家界至常德的汽车站时刻表 东营去威海的汽车 杭州至柯桥汽车 韶关2005年汽车数量 玉溪到曲靖市汽车票 兴义 重庆 汽车时刻表 从济南到滨州的汽车时刻表 通海到蒙自汽车时刻表 从泰安到枣庄的汽车站时刻表 玉溪到曲靖市汽车票 张家界至常德的汽车站时刻表 从泰安到枣庄的汽车站时刻表 海门到南通汽车票多少时间 杭州至柯桥汽车 里水到大沥汽车站 张家界到沅江的汽车站时刻表 淮安到北站汽车时刻表 海门到南通汽车票多少时间 里水到大沥汽车站 永修到乐平的汽车 通海到蒙自汽车时刻表 韶关2005年汽车数量 长沙汽车南站到长沙火车站公交 北京汽车博物馆边酒店 汽车上都有什么表 石家庄北到衡水的汽车时刻表 兴义 重庆 汽车时刻表 杭州至柯桥汽车 石家庄北到衡水的汽车时刻表 长沙汽车南站到长沙火车站公交 通海到蒙自汽车时刻表 江北机场的汽车站在哪里坐 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 尘与钢 少年踏剑行 新世纪之何生 斩阴 天源仙农 皇冠登3出租 亚星管理平台 澳门葡京游戏官网 皇冠登3出租 亚星官网 永修到乐平的汽车 兴义 重庆 汽车时刻表 扬州汽车客运西站app 扬州汽车客运西站app 从济南到滨州的汽车时刻表 从济南到滨州的汽车时刻表 丹阳至黄山汽车时刻表查询 江北机场的汽车站在哪里坐 自贡到宁波汽车票网上订票 玉溪到曲靖市汽车票 通海到蒙自汽车时刻表 畅途可以退汽车票吗 长沙高铁站到隆回的汽车站时刻表 高淳到无锡的汽车票 杭州至柯桥汽车 张家界到沅江的汽车站时刻表 兴义 重庆 汽车时刻表 丹阳至黄山汽车时刻表查询 玉溪到曲靖市汽车票 玉溪到曲靖市汽车票 杭州至柯桥汽车 从济南到滨州的汽车时刻表 海门到南通汽车票多少时间 丹阳至黄山汽车时刻表查询 自贡到宁波汽车票网上订票 长沙高铁站到隆回的汽车站时刻表 石家庄北到衡水的汽车时刻表 汽车上都有什么表 海门到南通汽车票多少时间 从泰安到枣庄的汽车站时刻表