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
勒流到深圳的汽车九资河镇到汉口汽车武汉到益阳汽车站西安汽车站网上售票济宁汽车南站去济南哪个汽车站勒流到深圳的汽车遵义到毕节的汽车票价武汉到益阳汽车站南海到深圳汽车站时刻表龙华到银湖汽车站辛集汽车站到旧城勒流到深圳的汽车常平回茂名的汽车号码哈尔滨汽车票微信武汉到益阳汽车站龙华到银湖汽车站呼市汽车终点站在哪万盛到茶园汽车时刻表万盛到茶园汽车时刻表泾县高铁和汽车站时刻表沧州到黄骅汽车最晚几点万盛到茶园汽车时刻表南海到深圳汽车站时刻表深圳银湖到河源的汽车济宁汽车南站去济南哪个汽车站汉中到广平汽车时刻表西安汽车站网上售票柳州到福鼎汽车郑州到亳州汽车晚上常平回茂名的汽车号码一夜之间,世界遭逢巨变,本是平民百姓的你,却意外拥有了罕见的异能......沥国末年,以澎国为首的、玥、岐三国欲撕破泯心之约重新制霸天下,短短一月间沥国便被战争波及覆没,天下再次陷入大乱之中,九州之地各处充满了争与血的景象! 群雄争霸,英雄辈出。一把剑,一壶酒,一缕情殇! 刀光剑影中,一位满腹热血的少年持剑走入纷乱破碎的江湖中: “让我看看,新的江湖会有何有趣的事情发生?!”【都市重生+宠妻+赎罪+商战】   “周飞,你相信有来生么?”   “如果有可能,我不想有来生,我只想重活一次,这辈子,有太多的遗憾了……”   濒死的虚弱感和无力感,让周飞连声音来自何方都无法分辨,不甘心、悔恨、遗憾…百般情绪涌上心头。   苟活三十多年,他对所有人都问心无愧,唯独对不起妻子和儿女!   带着这股极强的悔意,周飞重生到了十年前。   看着那一大两小三个身影,他跪倒在地,热泪盈眶。 李江,一个不是这个世界的人来到了这个世界。他没有比别人更多的本事,唯一的长处就是他有别人永远都没有的经验。经验这个东西,可以让一个平凡的人成为神,不是神话里面的神。 李江,觉得自己不是神。他只是多了一点别人没有的记忆,这是老天爷的恩赐;或者是上帝的奖励。总之,他来了,带着神一样的能力,来到了这个世界。他不是来改变这个世界的,但是世界却要注定因他而改变! 哥不是神!但哥却可以成为神话! 李岩原本是九宙大陆风国皇帝的第八子,却惨遭奸人陷害,导致他16岁还未觉醒血脉,于是他被皇室除名。他的母亲杨妃也被皇帝打入冷宫,最后被皇帝亲手杀死。数年后,李岩修炼大成杀了回来,让陷害李岩和杨妃母子俩的人跪在杨妃墓前忏悔,并且血债血偿! 依山而建的宏伟墓藏,却无一具尸骸,墓主人到底是谁,它们又身在何方。 十大古老家族,永不出世,到底在守护什么秘密。 吴惊蛰带领着考古队,探究着一切,却也踏上了一条不归路。姜止戈穿越书中成为恶名滔天的反派魔帝,开局就被男主带着女主围攻陷入必死局面。 濒死之际,他觉醒了人生记忆编辑系统,向世人展现他的过往。 于是乎,一段段催人泪下的记忆显现在世人面前。 “柔儿,记住,宁为乞丐,不为人奴,只要我还在一天,便绝不会让你去为奴为婢。” “紫烟,为了你,成魔又有何妨,举世皆敌又有何妨?” ....... 待到一切浮出水面,世人才明白。 恶贯满盈的魔帝,所做一切只为所爱之人,只为庇佑世间安宁。江湖传闻得天书者得天下,因为无字天书乃是上古奇物,可惜被分作五卷,失落人间,集齐残卷可以解开一个大宝藏。这时候青山镇上一个叫段浩天的少年,浪荡不羁,因缘际会下涉足江湖,他会如何把握自己的命运呢?顾清是一个大二即将毕业的学生,这个时候学校居然提前让学生们出来实习。刚刚出到社会工作的顾清又会遇到怎样的故事呢?他又会在什么时候脱单呢,不用每年都是双11和光棍节一起过吧!咯做尼同学
我的灵兽都是气运之子 风流狂兵俏天骄 我与妖女一起斩神 小白幻想曲 冲出二次元 黑暗游戏时光 丧尸危机:我重生在末日 花时酒一瓢 全民杀戮:开局掠夺神级机缘 寻天珠 缘起于夏 异世界转生体: 尘封游 从挨打开始 回归纪元 为长生不断奋斗 不对啊?明明没有这条街 大纪西游 重生回到刚实习时 我有一百零八个学姐 连州到江门汽车时间表 江西到贵阳的汽车站时刻表 呼市汽车终点站在哪 万盛到茶园汽车时刻表 连州到江门汽车时间表 商丘南站离汽车站多远 大连港汽车报价 凤台县到上海汽车查询 汉中到广平汽车时刻表 常平回茂名的汽车号码 南海到深圳汽车站时刻表 遵义茅草埔汽车时刻表 深圳银湖到河源的汽车 龙华到银湖汽车站 绵阳至简阳汽车票价 济宁汽车南站去济南哪个汽车站 大连港汽车报价 汉中到广平汽车时刻表 沧州到黄骅汽车最晚几点 勒流到深圳的汽车 江西到贵阳的汽车站时刻表 武汉到益阳汽车站 九资河镇到汉口汽车 哈尔滨汽车票微信 龙华到银湖汽车站 深圳银湖到河源的汽车 汉中到广平汽车时刻表 九资河镇到汉口汽车 沧州到黄骅汽车最晚几点 汉中到广平汽车时刻表 济宁汽车南站去济南哪个汽车站 江西到贵阳的汽车站时刻表 西安汽车站网上售票 勒流到深圳的汽车 柳州到福鼎汽车 济宁汽车南站去济南哪个汽车站 华蓥到眉山汽车时刻表 大连港汽车报价 深圳银湖到河源的汽车 华蓥到眉山汽车时刻表 济宁汽车南站去济南哪个汽车站 罗定到广州汽车票价 泾县高铁和汽车站时刻表 遵义茅草埔汽车时刻表 哈尔滨汽车票微信 江西到贵阳的汽车站时刻表 南海到深圳汽车站时刻表 西安汽车站网上售票 郑州到亳州汽车晚上 遵义到毕节的汽车票价 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 搞钱,师弟不开玩笑 重生之我是大主播 异德 洪荒历 机甲征途 百家乐官网 快连下载 欧博官网 葡京官网 欧博官网 遵义到毕节的汽车票价 深圳银湖到河源的汽车 哈尔滨汽车票微信 江西到贵阳的汽车站时刻表 辛集汽车站到旧城 绵阳至简阳汽车票价 南海到深圳汽车站时刻表 连州到江门汽车时间表 勒流到深圳的汽车 华蓥到眉山汽车时刻表 勒流到深圳的汽车 哈尔滨汽车票微信 汉中到广平汽车时刻表 郑州到亳州汽车晚上 济宁汽车南站去济南哪个汽车站 福州至宿迁汽车时刻表查询 大连港汽车报价 绵阳至简阳汽车票价 江西到贵阳的汽车站时刻表 罗定到广州汽车票价 凤台县到上海汽车查询 华蓥到眉山汽车时刻表 沧州到黄骅汽车最晚几点 商丘南站离汽车站多远 罗定到广州汽车票价 济宁汽车南站去济南哪个汽车站 华蓥到眉山汽车时刻表 大连港汽车报价 济宁汽车南站去济南哪个汽车站 辛集汽车站到旧城