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
初生9天的宝宝不爱吃瘦了一斤宝宝不同阶段奶粉选用24周B超宝宝腿好长24周加宝宝胎动一岁宝宝外八字脚初生9天的宝宝不爱吃瘦了一斤宝宝身体爱扭动正常吗24周B超宝宝腿好长经常自慰对宝宝好吗二十天宝宝有点咳嗽宝宝无形积食怎么办24周B超宝宝腿好长20个月宝宝会背诗宝宝无形积食怎么办刚怀孕20天怎么做宝宝健康不畸形二十天宝宝有点咳嗽宝宝二段换一段20个月宝宝会背诗20个月宝宝会背诗两岁宝宝肛门疼大便拉不出2岁宝宝可以做b超吗20个月宝宝会背诗秋季宝宝感冒咳嗽爱出汗宝宝满月长的少两岁宝宝吃啥好24周B超宝宝腿好长三岁宝宝能上幼儿园吗24周加宝宝胎动一岁宝宝外八字脚宝宝咳嗽有痰喉咙哑大纲:王晨穿越来到一个鬼怪横行的世界。   觉醒F级序列的他本来想着摆烂,可没想到,自家的猫却因为嫌弃等级太弱,连夜偷来了响雷果实。   不仅如此,斑爷的须佐能乎,闪闪天之锁,魔刀千刃,帝具?混沌钟都被偷来了。   …………   紧急通知,神魔降临,人类危矣。   那一日,当万千神魔降临,王晨须佐套雷佛,手持魔刀千刃和混沌钟,给众人演示了什么叫做诸神黄昏。      2009年到2021年间,g城作为改革开放后迅速崛起的沿海城市之一,政治经济快速发展,商界奇才、慈善大家、教育大亨······齐聚在g城,由此展开一场场腥风血雨的争斗······ 21世纪,麻雀终于在中国成为现象级运动。2015年,世界冠军邴燮于事故中丧生,并被世界遗忘。为了找出母亲事故的真相并冲击麻雀的顶点,一度放弃麻雀的亓兑和加入了灼华中学麻雀部,向2020年的全国大赛进发。秦天明穿越小说世界,成为小说中一个戏份不多的反派。 系统:只要宿主你完美杀青,就能够带着本系统回到你原本的世界当龙傲天。 秦天明:简单,演反派我最在行了! 结果女主不按剧本来,开始疯狂倒贴。 秦天明:能别倒贴了吗?我只想杀青啊!男主呢?你怎么还抑郁了?!讲述了我自己的真实故事,希望大家喜欢女娲传人,舍仙籍,入红尘,救渡世人。灵识虽在,却因历劫太多,丢失前世记忆,转世后遇着故人、仇敌,施巧计恢复金身。同时生逢乱世,多磨难,却不忘救世初心。其间遇到前世的因果,逃不脱世间男女前缘的纠葛,真真切切的体会到了凡人之情,最终历经民国救人,现世渡人,返回仙界,成就金身。江潮刚穿越古代,发现前身是个好吃懒做的主,家里还有一对苦命姐妹。 眼看断粮要饿死,江潮只能做个勤劳的小蜜蜂。 却不想日子有点盼头,土匪又上门了。 都不想我活是吧?那我就先弄死你,我可是全能特工,先弄几颗土雷轰你娘的。 土雷不怕?枪怕不怕?要不就搞几门炮炸你玩玩!没事,数理化哥全能。你来再多,有的是办法对付你。 朝为田舍郎,暮登天子堂! 从乡野到朝堂,江潮靠着领先这个时代千年的知识,竟渐渐握住了这个强盛王朝的脉搏。书籍是人类进步的阶梯古龙有一本书叫七种武器,而我这本短篇小说是一本纪实文学,真人真事,一个工作勤奋大半辈子的好男人晚节不保误入歧途,在狱中见识了形形色色的人,七个罪犯七个故事,通过这七个人七个故事来反思犯罪,让人们看到一个光怪陆离的世界。这是一本劝人为善的书,阿弥陀佛!算是一本赎罪的书吧!2019年度最火社会热血文!猪哥最新力作! 既然已经没有了路,那么人间炼狱,归我! 扣扣群:六九三七三五零五七。
弱冠少年逐道行 赶尸人的诅咒,原著 我不是箭神 传奇异术:把我送来当废物 藏武 大秦:金榜现世,祖龙求我君临天下 重生:我带着娇俏校花去修仙 至幻 坑坑世界 天地绝尘 星际混乱 窗边风铃 武冥诀 新十日谈 重生:我在玄幻造加特林 我在学校成修仙大佬 诡异血尸录 重生之潜龙在渊 神不渡 嗜血天团 宝宝二段换一段 两个月宝宝七天不大便 24个月宝宝可以手机看电视吗 一岁宝宝外八字脚 初生9天的宝宝不爱吃瘦了一斤 刚怀孕20天怎么做宝宝健康不畸形 怀孕晚期能喝宝宝的爱他美奶粉吗 宝宝脖子竖不起来 24周B超宝宝腿好长 宝宝咳嗽有痰喉咙哑 秋季宝宝感冒咳嗽爱出汗 一岁宝宝耸肩缩脖子 宝宝满月长的少 24个月宝宝可以手机看电视吗 宝宝无形积食怎么办 两岁宝宝吃啥好 怀孕晚期能喝宝宝的爱他美奶粉吗 24周B超宝宝腿好长 2岁宝宝可以做b超吗 宝宝败血症黄疸指数 24个月宝宝可以手机看电视吗 两个月宝宝七天不大便 宝宝体温不到35怎么办 二十天的宝宝夜里闹得很 24天的宝宝白天不睡觉 宝宝满月长的少 24周B超宝宝腿好长 二十天的宝宝夜里闹得很 20个月宝宝会背诗 24个月宝宝可以手机看电视吗 2岁宝宝可以做b超吗 24周B超宝宝腿好长 秋季宝宝感冒咳嗽爱出汗 宝宝二段换一段 经常自慰对宝宝好吗 宝宝经常吃妈咪爱好妈 秋季宝宝感冒咳嗽爱出汗 两个月宝宝七天不大便 经常自慰对宝宝好吗 刚怀孕20天怎么做宝宝健康不畸形 宝宝满月长的少 三岁宝宝能上幼儿园吗 宝宝体温不到35怎么办 24天的宝宝白天不睡觉 宝宝无形积食怎么办 宝宝败血症黄疸指数 宝宝脖子竖不起来 宝宝满月长的少 宝宝经常吃妈咪爱好妈 宝宝身体爱扭动正常吗 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 废柴的重生日记 留有遗憾 他老人家的小祖宗 全民修仙:我靠炼丹称霸天下 天命:人道永恒 百度 百度 百度 百度 百度 宝宝败血症黄疸指数 20个月宝宝会背诗 怀孕晚期能喝宝宝的爱他美奶粉吗 宝宝无形积食怎么办 经常自慰对宝宝好吗 宝宝满月长的少 二十天宝宝有点咳嗽 一岁宝宝耸肩缩脖子 24个月宝宝可以手机看电视吗 刚怀孕20天怎么做宝宝健康不畸形 刚怀孕20天怎么做宝宝健康不畸形 经常自慰对宝宝好吗 经常自慰对宝宝好吗 宝宝身体爱扭动正常吗 怀孕晚期能喝宝宝的爱他美奶粉吗 2岁宝宝可以做b超吗 宝宝败血症黄疸指数 一岁宝宝外八字脚 24个月宝宝可以手机看电视吗 初生9天的宝宝不爱吃瘦了一斤 三岁宝宝能上幼儿园吗 宝宝脖子竖不起来 怀孕晚期能喝宝宝的爱他美奶粉吗 两个月宝宝七天不大便 初生9天的宝宝不爱吃瘦了一斤 怀孕晚期能喝宝宝的爱他美奶粉吗 24个月宝宝可以手机看电视吗 三岁宝宝能上幼儿园吗 三岁宝宝能上幼儿园吗 二十天的宝宝夜里闹得很 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网