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
青藏电影电影善恶之屋洛东江电影麻吉熊电影字母g 电影海报青藏电影狙击手 外国电影洛东江电影爱回家韩国电影 迅雷下载看狼图腾电影观后感大众评价电影赤焰战场2中的枪械洛东江电影狼图腾电影好看吗86电影赤焰战场2中的枪械洛东江电影看狼图腾电影观后感大众评价欧美关于女狙击手的电影擦枪走火电影在线观看字母g 电影海报志气电影观后感2000字电影院好看的电影擦枪走火电影在线观看爱回家韩国电影 迅雷下载穆赫兰道 电影老巫婆电影黄渤和刘烨哪个电影片酬高老巫婆电影日韩另类电影志气电影观后感2000字关于少年搏击的电影暂无李相,一名24岁大学生 意外穿越到武侠修真世界 从武侠小白变成行走江湖四处留名的一代大侠 一路上鲜衣怒马,一路上血溅四方 经历过众叛亲离,历经过人间温暖 敢问在下何人 “李相是也” 帮助美女上司摆脱陷害的黄非凡,成为公司派系斗争的棋子,被上司排挤到养殖场。 本就事业不顺,女友这时又跟着出轨,让黄非凡彻底跌入低谷,从事业到爱情遭受双重打击。 不过因为一次善举,让黄非凡彻底改变命运,开始时来运转,一路攀升。 最终从一个人人瞧不上的草根,成为众人逢迎巴结的大鳄! 且看职场小白黄非凡不寻常的崛起之路!梦里的你再强大也是真的,少年意外进入梦中世界现实里菜鸡的他在梦里体会到了力量的强大,于是在梦中世界迎娶白富美走向人生巅峰。一座有着历史创伤的繁华都市,一片人心险恶的江湖,一群精明能干的警察,几个盘踞已久的社团,一个曾经大佬的儿子,如何在这波谲云诡、大风大浪中明哲保身?兄弟还是兄弟么?生意还是生意么?爱情还是爱情么?所有的道义、江湖、谋略、情爱,一副关于城市的地下江湖的历史画卷,都在这里慢慢展开......开局有个外挂系统,只不过这个系统是个超级人工智能。一个平凡人遇到一个超人工智能红月当空,全球骤变。拥有力量,你就高高在上,应有尽有,没有力量,你就只能任人宰割。危机爆发,众种族林立,丧尸,异兽,鬼种,人类。九转山河,浩瀚天下,试问天下,谁与争锋!起步比别人晚的颜逸能否追赶众人的脚步,在末日之中杀出一条属于自己的路。一代废柴李杜天生无灵根,被万人唾弃,却不曾放弃,专修丹道,可一次机缘巧合之下,获得了妖仙的传承,从此步入妖道,抢万世之资源,夺天地之造化,一场奇妙又惊险的另类修仙,就此开始……我是一个老千,为了报仇,我坐上赌桌,以千术把仇人踢进赌博的深渊。老千生涯,靠赌为生。三教九流,江湖百态。 赌桌上,没有常胜将军,输一次,万劫不复。天生绝品丹脉却一夜散尽,从家族明珠一朝变成弃子,成为一名小小的种药工,依旧无法置身事外。 遂跃于凡尘,种药炼神丹,炼体为炉鼎,活脱脱将自己炼成了绝世的神丹。
会长不菜 神谕:崩坏 天行烟雨 王二狗的妖孽生活 乱世货郎 圣灵星皇子到地球做大少 网游使徒 摊牌了,龙背上的剑舞者 镇国大帅 敬亭山访谈录 末世游轮行 修仙:我的系统有点坑 拜见小天师 旧档案 开局灵气开挂? 重生之绝世仙尊 皇城根下有妖 绿茵江湖 点道人 从继承悟空绝学开启无敌 黄渤和刘烨哪个电影片酬高 双狙人电影 意大利做爱的电影 字母g 电影海报 电影善恶之屋 日韩另类电影 意大利做爱的电影 一名少年自学格斗韩国电影? 等待 只为与你相遇 电影 狼图腾电影好看吗86 兄弟之情的微电影 兄弟之情的微电影 穆赫兰道 电影 双狙人电影 青藏电影 字母g 电影海报 美国拳击电影好看的 黄渤和刘烨哪个电影片酬高 哪里可以看第三种爱情电影 洛东江电影 双狙人电影 洛东江电影 哪里可以看第三种爱情电影 擦枪走火电影在线观看 看狼图腾电影观后感大众评价 七七事变电影插曲叫什么名字 黄渤和刘烨哪个电影片酬高 哪里可以看第三种爱情电影 哪里可以看第三种爱情电影 等待 只为与你相遇 电影 字母g 电影海报 3d电影大明猩下载 麻吉熊电影 青藏电影 穆赫兰道 电影 老巫婆电影 麻吉熊电影 意大利做爱的电影 穆赫兰道 电影 2015年电影频道播放的抗日战争片 老巫婆电影 一名少年自学格斗韩国电影? 志气电影观后感2000字 美国拳击电影好看的 电影赤焰战场2中的枪械 3d电影大明猩下载 兄弟之情的微电影 老巫婆电影 七七事变电影插曲叫什么名字 欧美关于女狙击手的电影 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 卿天途 三国,想成仙,被曹操赐婚 飞星坠海记 结夏蝉声代代鸣 网游:我能无限强化技能 AG真人 欧博官网 亚星游戏官网 AG真人 百家乐官网 美国拳击电影好看的 日韩另类电影 兄弟之情的微电影 欧美关于女狙击手的电影 电影院好看的电影 电影赤焰战场2中的枪械 双狙人电影 3d电影大明猩下载 电影善恶之屋 爱回家韩国电影 迅雷下载 黄渤和刘烨哪个电影片酬高 洛东江电影 麻吉熊电影 黄渤和刘烨哪个电影片酬高 狙击手 外国电影 2015年电影频道播放的抗日战争片 擦枪走火电影在线观看 字母g 电影海报 志气电影观后感2000字 日韩另类电影 3d电影大明猩下载 美国拳击电影好看的 电影院好看的电影 兄弟之情的微电影 一名少年自学格斗韩国电影? 小花电影简介 麻吉熊电影 狼图腾电影好看吗86 关于少年搏击的电影 一名少年自学格斗韩国电影?