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
驾校招学员驾校宝典科三视频搜狐驾校招学员困难驾校中午到几点驾校中午到几点下班驾校招学员驾校 中介驾校招学员困难驾校安全管理例会制度驾校转驾校花多少钱啊驾校重新开业宣传句子驾校招学员驾校 体检 自带照片驾校重新开业宣传句子驾校招学员困难驾校转驾校花多少钱啊驾校13项管理制度驾校中午几点下班驾校中午几点下班驾校招生规定驾校安全管理责任制度驾校中午休息时间驾校爱心送考活动总结驾校报名几点钟驾校中午到几点下班驾校报名到科目一驾校中午到几点驾校报名几点上班吗驾校招生规定驾校 体检 自带照片一代圣魂降临,凭废躯重返巅峰,修五逆破障称神彼时的少年已经站在了成长尽头,回首过去,一切崎岖早已繁花盛开。新征程,新旅途。抛却世间缈雾,着光阴今果。 世外之间,人世间中,黑塔醒然入眼。或是历史,淘尽多少世事。时间已然成为了尺度,日复一日的丈量。一股庄严并着沧桑由然而出。日起月落,星斗云隐,光入塔,勾勒出曼妙的影。此刻,人类彷徨 这是一个肉身横推一切的故事。 大业皇朝,黑暗降临,处处充满邪灵鬼怪,杀人无形。 面对妖异邪祟,普通人只能瑟瑟发抖,蜷缩角落,静待生命走到尽头。 江道穿越而来,携带武学修改系统,任何武学只要被他看一眼,就可以无限修改。 疯魔棍法、鹰爪铁布衫、毒砂掌、暴猿神功…统统修改到一千年后的境界。 面对妖异邪祟,江道身躯魁梧,浑身肌肉,目光如电,随手抓碎一只入侵的邪灵,语气低沉,万分恐怖。 “邪灵?谁说武学杀不死邪灵?” 大纲:王晨穿越来到一个鬼怪横行的世界。   觉醒F级序列的他本来想着摆烂,可没想到,自家的猫却因为嫌弃等级太弱,连夜偷来了响雷果实。   不仅如此,斑爷的须佐能乎,闪闪天之锁,魔刀千刃,帝具?混沌钟都被偷来了。   …………   紧急通知,神魔降临,人类危矣。   那一日,当万千神魔降临,王晨须佐套雷佛,手持魔刀千刃和混沌钟,给众人演示了什么叫做诸神黄昏。      当电锯离我脖子只有0.01厘米时,原本以为我是没了,却没想到被一个金发萝莉给救了下来,而且她说:你就是我的master吗? 于此,一段互相救赎的故事开始了,请看英灵在,最古老的国家降妖除魔!肖弈上一世瞎了眼爱上了林浩宇,最后林浩宇却杀了肖弈,王一泽替肖弈挡了一刀,王一泽死后肖弈抱着他的身体发誓,若有来生他一定会好好爱你,最后重生的故事一个标准的配音演员,穿过了一扇录音棚的门,走进了一个洪荒世界,从洪荒到城市,从懵懂到坚强,从一群飞禽走兽的朋友,到一帮生死与共的兄弟,他不是神,但他会带着兄弟们去走他们的路!一段波澜壮阔的生死旅程在你的面前徐徐展开!六道沉沦,天人崩碎 逆天第一人沉睡祖地,沧海桑田,祖地福荫 十万年太久,只争朝夕! 天月金轮,再起天之战!行进诸天万界,还有什么比猥琐发育更好的吗? 不论三国,亮剑,洪荒还是武则天,或者是神雕侠侣,只有悄悄剧透才能苟到最后
仰慕星空 丧尸围城:我拥有终极魔典 茹毛饮血 留有遗憾 我的一米书屋 梦与世界的距离 我不是棋子 射仙问道 都市狂龙 阳监事务所 无心之物 罪启 离婚后,我捧红了文娱天后 阴阳小面馆 系统之上下五千年 天才小前锋 行于巅峰 修元大陆之林玄 全球灾变:我有百倍振幅 意识 空间 驾校宝典客服电话 驾校转驾校花多少钱 驾校13项管理制度 驾校中午几点下班 驾校宝典客服电话 驾校报名几点上班 驾校爱心送考 驾照开始换驾校 驾校报名到科目一 驾校 体检 自带照片 驾校爱心送考活动总结 驾校爱心送考活动总结 驾校报名几点钟 驾校转驾校花多少钱啊 驾校招生制度 驾校中午到几点下班 驾校爱心送考发言稿 驾校报名到科目一 驾校安全管理责任制度 驾校招学员 驾校转驾校花多少钱 驾校招学员困难 驾校宝典科三视频搜狐 驾校中午休息时间 驾照开始换驾校 驾校报名几点钟 驾校报名到科目一 驾校宝典科三视频搜狐 驾校安全管理责任制度 驾校报名到科目一 驾校中午几点下班 驾校转驾校花多少钱 驾校中午到几点 驾校招学员 驾校报名几点钟 驾校中午到几点下班 驾校中途可以换教练吗 驾校爱心送考 驾校报名几点钟 驾校中途可以换教练吗 驾校中午到几点下班 驾校 经营 驾校招生规定 驾校爱心送考发言稿 驾校中午休息时间 驾校转驾校花多少钱 驾校爱心送考活动总结 驾校中午到几点 驾校报名无居住证 驾校 中介 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 咒术梦魇之真正的地狱 圣尊殿 战魂封神录 血奴营一号 幻灵:我是全球最强 百家乐官网 澳门葡京游戏官网 澳门葡京官网 百家乐官网 万利游戏官网 驾校重新开业宣传句子 驾校安全管理责任制度 驾校招生制度 驾校中途可以换教练吗 驾校招学员 驾校报名到科目一 驾校 经营 驾校13项管理制度 驾校报名到科目一 驾校报名几点上班吗 驾校报名到科目一 驾校中午几点下班 驾校报名到科目一 驾校报名几点钟 驾校报名几点上班吗 驾校爱心送考活动总结 驾校爱心送考 驾校招生规定 驾校重新开业宣传句子 驾照开始换驾校 驾校转驾校花多少钱啊 驾校招学员困难 驾校安全管理责任制度 驾校报名几点上班 驾校中途可以换教练吗 驾校中午到几点下班 驾校中途可以换教练吗 驾校13项管理制度 驾校中午到几点 驾校中午休息时间