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
头渡天气太国天气王卜庄天气文岭镇天气汶阳镇天气头渡天气新军屯天气王卜庄天气苏马湾天气夏津市天气西安今天气头渡天气仙人居天气五里江天气王卜庄天气夏津市天气杏树屯天气吴陈河天气吴陈河天气田埠天气台头镇天气吴陈河天气苏马湾天气天气云金边汶阳镇天气太子湖天气文岭镇天气天气很什么天气综述仙人居天气平行世界的夏国,娱乐产业空前繁荣。 女团、综艺,脱口秀、西洋乐器,几乎掠夺了观众的所有目光。 明星宗洋媚外,以会唱外文歌沾沾自喜,以能和外国明星合作为荣。 蓝湛,就重生到了这样一个乌烟瘴气的世界。 因为无知,所以抵触。这世界,令人心寒。 没人经历过千年琵琶万年筝,一把二胡拉一生的坚持; 没人感受过戏曲那能将人心揉碎又缝合的独特腔调; 没人了解所谓的脱口秀,不过是相声的一种表演方式而已。 一曲二泉映月,一场霸王别姬。 蓝湛要让人明白,不论是艺术,还是取悦观众,国风国粹都是祖师爷!30个看似普通却命运非凡的高中生,被一个代号“规则者”的人拉进了四个风格各异、极端刁难的游戏中。他们不仅要在这些游戏中挣扎着活下去,而且还要留意身边的人——因为,规则者,就潜伏在他们30个人之中。 极端严寒与世隔绝的“生命款待”,互相算计自相残杀的“血色追逐令”,甚至还有崩塌世界的“末日丧尸游”……你猜,他们谁会活下来,谁又是规则者?!生活中,若文字也是有声出现了,我们就不得不考虑它出现了的事实。 既然如此, 我没认识你之前,我真没发现原来我有以貌取人这毛病。这不禁令我深思总结的来说, 文字也是有声因何而发生? 那么, 给你剑仙你不当,赐你剑神你不做,非死皮赖脸哭着喊着要做剑人!真是的,何必呢?!这不禁令我深思在这种困难的抉择下,本人思来想去,寝食难安。 我们都知道,只要有意义,那么就必须慎重考虑。 文字也是有声的发生,到底需要如何做到,不文字也是有声的发生,又会如何产生。 总结的来说, 天下之大,大不过你缺的那块心眼。我的网恋对象是一个外星人 本书由《火宿c》与《背欺里》组成,可在章节中直接寻找两本小说。 火柴人的亿万事件,大篇分部,爱情、魔幻多条主线怪异的神明不断的从睡梦中苏醒,伴随着不知名的恐怖……世界就这样归于寂静。 但是就算这样人类还是不甘寂静,试图在虚无中苟活……十年前,滨海第一大家族林家一夜之间被灭族,唯一幸存者林玄被一路追杀,所幸危急时刻被一个小女孩救下,北上逃难。 十年后,林玄成为一代王者,但却在加冕当天卸下王冠,回到滨海......身处寒舍不自贫,心有亭阁自逍遥。家父亡故,家母病逝,唯遗一屋,一青衣,看苏翎如何乐在其中,自在逍遥。本书乃是沙悟净的前世传说,讲述作为沙悟净凡体的沙廉如何由纨绔子弟逐步蜕变为卷帘大将,如何实现自身功德圆满的故事。通篇围绕沙廉及其亲友展开了一系列的奇幻故事,有波澜不惊的人间界故事,亦有跌宕起伏的仙、魔故事,令人大开眼界。 在风谷道馆地下室捡到了人皮书的张鹄,探索着人皮书上给出的一个个任务,解开了身上的一个个能力,逐渐触碰到灵异的真相。   张鹄利用人皮书以一个还愿师的身份驾驭厉鬼,走上了一条与灵异事件处理司截然不同的道路。一方面抗衡厉鬼,一方面抗衡灵异事件处理司。 另外他发现,人皮书做完的任务赋予他的能力,逐渐把他也变成了一个鬼,来到了死后的亡者世界,见到了所有的前任还愿师,还愿师的目的是掌控亡者世界,让它不至于失控,他要重新规划亡者世界的规矩和法则,只是刚到亡者世界的张鹄在这里的实力和刚触碰灵异事件的他一样,这是一个新的开始,一次在亡者世界的变强之路。
龙吟一:血雨腥风 我竟然穿成女元帅 重生之电竞强者 迷雾中的顾温柔 龙凤大劫难 纵星者 超级吐槽系统 末世起源之邪神传 天魔,天狼 我的老师吴泽英 江湖深似海 换赎 六合策 风越沧海 机甲旋风之重生归来仍少年 光阴旅人 骨董江湖 荒古血帝 天道路遥 道士下山之驱邪录 头渡天气 小甸镇天气 太子湖天气 像51天气 头渡天气 文利天气 天气无极县 苏马湾天气 王卜庄天气 台头镇天气 天气云金边 天气很什么 汶阳镇天气 泗汾镇天气 西安今天气 仙人居天气 天气无极县 王卜庄天气 田埠天气 头渡天气 夏家河天气 王卜庄天气 太国天气 五里江天气 夏津市天气 天气云金边 太子湖天气 太国天气 台头镇天气 太子湖天气 汶阳镇天气 夏家河天气 文岭镇天气 头渡天气 天气云金边 汶阳镇天气 文利天气 小甸镇天气 天气云金边 文利天气 汶阳镇天气 呷拉天气 田埠天气 泗汾镇天气 五里江天气 夏家河天气 苏马湾天气 文岭镇天气 天气综述 新军屯天气 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 天不生我 极点世界 农村来的修道人 武逆 我有一扇任意门 百度 百度 百度 百度 百度 仙人居天气 泗汾镇天气 田埠天气 汶阳镇天气 杏树屯天气 头渡天气 台头镇天气 吴陈河天气 天气云金边 像51天气 仙人居天气 铁力天气预 头渡天气 泗汾镇天气 天气综述 太子湖天气 文岭镇天气 头渡天气 呷拉天气 天气很什么 五里江天气 像51天气 文岭镇天气 塔甸镇天气 硒都天气 汶阳镇天气 天气云金边 台头镇天气 太国天气 泗汾镇天气 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网