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
驾校模拟培训一驾校桑塔纳跟捷达驾校牡丹卡下来时间驾校能加班练车吗驾校培训约学时驾校模拟培训一驾校汽车起步视频教程驾校牡丹卡下来时间驾校全国统一教学大纲驾校汽车启动步骤驾校评价点评驾校牡丹卡下来时间驾校汽车起步的步骤口诀驾校评价点评驾校牡丹卡下来时间驾校坡道起步度数驾校汽车停车步骤驾校皮卡还有桑塔纳驾校培训约学时驾校面签在什么地方驾校日常管理日志驾校皮卡还有桑塔纳驾校全国统一教学大纲驾校面签了才能注册吗驾校能学几年有效期驾校桑塔纳价格驾校能学几年有效期驾校面签窗口图片驾校面签在什么地方驾校汽车起步视频医理入武,自创玄虚魔体。 善恶一体,衍生七情六欲。 心火入刀,焚灭三毒四劫。 燹魔一叹,刀斩尘世百态。 朋友一般叫我枫音道人 敌人一般叫我疯阴老魔 其实大家可以叫我风影,风灵月影的风影一次意外让我失去了所有,通过转变开始了新人生,却从此踏上一条江湖路,我是否能战胜一次次挑战,开启属于自己的巅峰。我莫名的来了了一片大陆,这里可以有龙国的东风,也可以有西方的魔法。可以有激情的战斗,也可以有惨破的逃亡。还有…… 全书以第一人称的视角,以叙事的手法讲述故事。第一次写书,多多支持一个出身贫寒的人 ,进入警局有多大的用处记忆复苏,在外界大陆重新修炼,寻找当年的死。随着实力越来越强,真相便离我越来越近。犯我绝,吞天地,一生下来只为吞噬天道,自我化道。车辚辚,马萧萧,行人猎枪各在腰; 村镇灯火不再现,黔首飘曳迦南遥。大一新生徐庶有一天得到了外星文明的系统,从此走上了不一样的人生。 高能电池、家务机器人、智脑助手、智能工厂、反重力穿梭机、星际飞船、核聚变等各种黑科技在徐庶手上层出不穷。 地球上的科技文明等级一次次不断地突破,向着星空进军,未知的宇宙海正等着人类去探索,也等着您去发掘... 火热1990,武长风敲开时代蛋壳,重生而出。 望着穷酸的家庭,高额负债,负气出走的老婆…… 他稳定心态: “先别慌,赚特么一波在说……” 唉? 这里有个野生的女骗子,一个大饼砸下去,收入囊中,为我所用。 女骗子:老娘行走江湖多年,从来未见过如此厚颜无耻之人! …… 大国崛起,工业为王!
全球尸潮:开局获得军火库 离魄长安行 死亡游戏,饕餮盛宴 暗黑破坏神之狂怒 残阳起风雷 博士重生之复仇 猎猎西风啸 不争之补天 万古雷体 都市:我有复制拿来吧你! 日绝 我的狼人杀有问题 当红日临空 念凡纪元 三国:开局召唤盖伦 究极无敌修炼系统 千门八将 超凡进化:横推九天万界 能量传说 舞风弄影 驾校桑塔纳价格 驾校坡道起步度数 驾校汽车停车步骤口诀 驾校培训约学时 驾校桑塔纳跟捷达 驾校面签窗口图片 驾校汽车停车步骤口诀 驾校汽车起步的步骤 驾校面签成功要多久? 驾校汽车起步的步骤口诀 驾校强制模拟举报 驾校强制模拟举报 驾校面签了才能注册吗 驾校坡道起步度数 驾校模拟培训一 驾校能学几年有效期 驾校汽车正确起步方法 驾校桑塔纳价格 驾校三年从报名算起吗 驾校牡丹卡下来时间 驾校坡道起步度数 驾校牡丹卡下来时间 驾校三年从报名算起吗 驾校皮卡还有桑塔纳 驾校汽车启动步骤 驾校面签能自己去吗 驾校桑塔纳价格 驾校三年从报名算起吗 驾校三年从报名算起吗 驾校面签成功要多久? 驾校培训约学时 驾校凭证在哪儿打 驾校能加班练车吗 驾校模拟培训一 驾校面签了才能注册吗 驾校能学几年有效期 驾校能加班练车吗 驾校汽车停车步骤口诀 驾校面签了才能注册吗 驾校哪里便宜 驾校能学几年有效期 驾校汽车起步的步骤 驾校面签在什么地方 驾校汽车正确起步方法 驾校评价点评 驾校凭证在哪儿打 驾校强制模拟举报 驾校能学几年有效期 驾校面签能自己去吗 驾校汽车停车步骤 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 第一人格和第二人格 混元魔神体 前哨基地 书剑传奇录 海贼王之云上漫游 欧博官网 百家乐官网 亚星管理平台 欧博官网 亚星管理平台 驾校强制模拟举报 驾校模拟培训一 驾校凭证在哪儿打 驾校哪里便宜 驾校模拟培训一 驾校汽车起步视频 驾校牡丹卡下来时间 驾校能学几年有效期 驾校汽车起步的步骤口诀 驾校培训约学时 驾校面签成功要多久? 驾校评价点评 驾校面签成功要多久? 驾校强制模拟举报 驾校面签窗口图片 驾校坡道起步度数 驾校面签在什么地方 驾校汽车启动步骤 驾校强制模拟举报 驾校汽车起步的步骤口诀 驾校汽车启动步骤 驾校面签成功要多久? 驾校汽车起步的步骤 驾校汽车停车步骤 驾校桑塔纳跟捷达 驾校汽车停车步骤 驾校能学几年有效期 驾校汽车正确起步方法 驾校能学几年有效期 驾校面授课程完成后