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
宝宝拉肚子水多便少九个月宝宝脸蛋红干燥3岁半宝宝门牙两岁半宝宝用什么洗发水宝宝发烧38度手脚烫宝宝拉肚子水多便少满月宝宝腿一登一登3岁半宝宝门牙一岁宝宝拉桔子颗粒宝宝母乳为何腹胀一岁半宝宝拉肚子酸臭味3岁半宝宝门牙4个月宝宝拉肚子吃中药能好吗一岁半宝宝拉肚子酸臭味宝宝自从穿的多爱生病宝宝母乳为何腹胀五岁宝宝满嘴溃疡宝宝总摇头是怎么回事宝宝发烧38度手脚烫宝宝挠过得地方肿宝宝到几个月肚子不疼宝宝总摇头是怎么回事一岁宝宝拉桔子颗粒宝宝一天两顿米粉时间怎么分配三个月宝宝睡觉笑出声九个月宝宝喝什么益生菌三个月宝宝睡觉笑出声宝宝屁股上有坑是肌肉萎缩宝宝挠过得地方肿宝宝什么时候喝锌最好  一座天山隔绝着两个世界,苍茫大山的深处,一座孤独的小城,人们在此中渡过千百贫瘠的岁月。      城中一日,城外百年。      天山后,彼岸的世界日夜呼呼着少年躁动的心。      天山冷宫不死药、玄之又玄的气脉武学、死者复生的诡秘巫术、帝国雄纠百万铁虎豹骑、天灵珍兽.........      为了那未层谋面的未婚妻。      高考吧!      为了那前所未见的新世界。      高考吧!!      为了十八岁后,那激昂炽热的生命。      高考吧!!!一位现初二的男学生的真实生活,随便写写,在不高兴的时候可以抒发一下。也请大家支支招,这样最好。工欲善其事,必先利其器。 这一位面的大陆之初,便是存在着灵力之气和神兵之力两股力量。 灵力提高实力,神武提高战力。 修炼者将灵力修为分九转十二境: 感知境、淬体境、彻地境。 通天境、天王境、天灵境。 仙灵境、神灵境、圣灵境。 无界境、虚无境、乾坤境。 境界越高,越难突破。 稍有不慎,便是陨落。 则兵器共分为:地武、天武、灵武、仙武、神武五等。 其中可细分为;低级、中级、高级 则武学同样分为:地品、天品、灵品、神品 而其中也是由高到低分为:低级、中级、高级 独自前往国外留学的体育生凌云,在一次英雄救美后,意外激活了一个逆天的系统,开始了自己称霸篮坛之路!!!一个宅男穿越到日本战国时代,逢凶化险,不断适应成长的历险故事。张天峰重回1993年,以90元豪博100万。 从实业入手,一招盲盒经济享誉全球。 入股双马公司,教两人玩转用户流量经济。 控股苹果集团,教乔布斯设计一款完美手机。 ...... 拥有前世记忆,赚钱非常简单。 这一世,张天峰要教未来富豪赚钱,让他们把自己送上首富的宝座!意外穿越明朝下一任败家皇帝朱厚照身上,作为太子时,不断搞事情,不断败家,非但没有将明朝败亡,反而是将明朝带上了世界巅峰,万国臣服,仰望天朝大佬。 朱厚照的名言:本太子用点钱怎么了,这以后都不是我的吗?何况我现在父皇吃我的用我的,本太子说什么了吗? “我是谁?我从哪来?我要到哪去?”这亘古不变的问题困扰着少年,他望着海面脑海里一片空白,他失去全部的记忆只留下一具空白的身体,我之前是个什么样的人,是一个冒险家?是一个魔法师?是一个厨师?是一个建筑师?是一个酿酒师?是一个农民?是一个工人?是一个商人?是人人称赞的好人?是坏事做尽的恶人?是平平无奇的市民?无数的疑惑压在少年的心上,幽幽中一个声音传来,“去篱下院吧,那里有你需要的答案。”于是少年踏上寻找自我的旅程,在路上他会遇到什么样的冒险呢?又会遇上什么样的人?一个新的更黑暗的时代正在到来。国王们的贪婪点燃了一场看似无休无止的战争。当人们在战斗时,野性的怪物正在吞噬着边境。随着田地休耕,村庄被遗弃了。凶残的强盗在荒凉的地方游荡。 对于一个无名的地精奴隶来说,这些都无关紧要。他只是想在没人看见的时候,尽可能多的把食物塞进嘴里,但是命运却走了一条扭曲的路线,所以他被带到了遥远的铁齿山。为了活命,他必须进化成不仅仅是一个小妖精,并且在北方的森林中开辟出一条血路。 大学生平静的生活遭到破坏,噩梦的生活开始,不值得相信的同学
新奥特列传欧布捷德赛罗 我在东瀛绘出百鬼夜行 一界同生 洪荒:开局变成大道 异世三国世界中的世界 规则碎片 震惊!大婚当日,你给我送个孩子? 两个欢喜冤家 剑道狂人 我的老师吴泽英 武道人王 我就是一个做白事的 横纵流 啥!我直播间能见鬼 阴阳界之仇仙 末日尸行 法师世界之传说 共分天下 转生成我自己?!! 兵王出征 九个月宝宝喝什么益生菌 宝宝上吐下泄精神不好 宝宝出疹子吃药 宝宝发烧38度手脚烫 九个月宝宝脸蛋红干燥 宝宝屁股上有坑是肌肉萎缩 宝宝出疹子吃药 宝宝寒咳流黄鼻涕 宝宝晚上睡觉经常反奶进鼻子里 4个月宝宝拉肚子吃中药能好吗 一个月宝宝眼睛有眼屎 一个月宝宝眼睛有眼屎 宝宝一天两顿米粉时间怎么分配 宝宝上吐下泄精神不好 宝宝拉肚子水多便少 宝宝发烧38度手脚烫 宝宝换的牙齿还会长吗 九个月宝宝喝什么益生菌 宝宝嘴巴周围发白 3岁半宝宝门牙 宝宝上吐下泄精神不好 3岁半宝宝门牙 宝宝嘴巴周围发白 宝宝总摇头是怎么回事 宝宝母乳为何腹胀 宝宝快六个月需要补维生素d 九个月宝宝喝什么益生菌 宝宝嘴巴周围发白 宝宝嘴巴周围发白 宝宝晚上睡觉经常反奶进鼻子里 宝宝发烧38度手脚烫 三岁宝宝总是不好意思 两岁半宝宝用什么洗发水 宝宝拉肚子水多便少 宝宝一天两顿米粉时间怎么分配 三个月宝宝睡觉笑出声 两岁半宝宝用什么洗发水 宝宝出疹子吃药 宝宝一天两顿米粉时间怎么分配 宝宝自从穿的多爱生病 三个月宝宝睡觉笑出声 宝宝寒咳流黄鼻涕 宝宝挠过得地方肿 宝宝换的牙齿还会长吗 一岁半宝宝拉肚子酸臭味 三岁宝宝总是不好意思 一个月宝宝眼睛有眼屎 三个月宝宝睡觉笑出声 宝宝快六个月需要补维生素d 五岁宝宝满嘴溃疡 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 阴阳传录 神豪:我呼吸就赚钱 御兽异次元:位面之战 大宋:神级抽奖系统 王二浪的幸福生活 万利游戏官网 欧博游戏官网 欧博官网 万利游戏官网 快连下载 宝宝总摇头是怎么回事 三岁宝宝总是不好意思 一岁半宝宝拉肚子酸臭味 5个月宝宝竖抱头不太稳 一个月宝宝眼睛有眼屎 九个月宝宝脸蛋红干燥 宝宝拉肚子水多便少 宝宝自从穿的多爱生病 宝宝拉肚子水多便少 宝宝什么时候喝锌最好 3岁半宝宝门牙 三个月宝宝睡觉笑出声 4个月宝宝拉肚子吃中药能好吗 宝宝快六个月需要补维生素d 宝宝晚上睡觉经常反奶进鼻子里 一岁半宝宝拉肚子酸臭味 宝宝出疹子吃药 一个月宝宝眼睛有眼屎 宝宝换的牙齿还会长吗 五岁宝宝满嘴溃疡 三个月宝宝睡觉笑出声 三岁宝宝总是不好意思 宝宝晚上睡觉经常反奶进鼻子里 一个月宝宝眼睛有眼屎 宝宝出疹子吃药 5个月宝宝竖抱头不太稳 宝宝换的牙齿还会长吗 宝宝到几个月肚子不疼 宝宝挠过得地方肿 宝宝嘴巴周围发白