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
农业与园林专业论文题目农业供给侧改革的论文农业与园林专业论文题目女性生殖健康论文2000暖通与空调英语论文农业与园林专业论文农发行风险防控论文女生抢遭抢劫论文农业发展动态论文农村环境实践论文能力越大责任越大论文农业与园林专业论文题目农村教育现状的论文开题报告欧式酒店毕业设计论文女生抢遭抢劫论文农村环境实践论文农林经济管理论文范文欧式酒店毕业论文欧式酒店毕业论文南安粮食小论文农业供给侧改革 论文欧式酒店毕业论文农业发展动态论文农业社会主义改造论文暖通与空调英语论文农业论文摘要女性生殖健康论文2000农业社会主义改造论文南安粮食小论文农村教育现状的论文开题报告王侯将相,宁有种乎? 泱泱大晋,达官显赫,人才无数。 但我罗明秋亦能以蝼蚁出身,搅动风云。 文官之首:“燕雀安知鸿鹄之志哉?吾亦不知罗明秋!” 镇国将军:“这一扎子读书人中,某最服的就是罗侯爷。” 真龙:“这龙椅,明秋君比我更合适!” 皇后:“与君相见恨晚,若不然,这后宫之主不当也罢……” 且看一介书生,如何拨弄这天下棋盘…… 命运多舛的少年,不谙世事的灵智,两者的结合在九州大陆掀起了阵阵腥风血雨。 在这里也许会看到华夏神话的延续,也许会看到超强的灵宝,也许会看到上古遗迹,也许会看到各种稀奇古怪的异兽,也许会看到魔之本相……神明布下游戏,每个人都可以参与并拥有变身铠甲的能力,不同的召唤器散落世界,获得它的人会变得如何呢?一个平凡的摸鱼打工人,一次宿醉后莫名转生异界。 获得了先天灵根,开启了一段朋克的修仙生涯。军校毕业生穿越回平行时空,征战大陆这个时代是悲哀的,遥望未来,只有一片黑暗......在这片神奇的大陆上,分为武师,圣武师,武灵,武尊,武宗,武王,武圣,武皇,武帝......每个人还可以和契约兽达成契约,以助其修炼,每个人都在向往成为武帝,墨晔也不例外......三年前,叶凡入赘豪门,被骂废物,意外车祸昏迷半年之久。 此刻终于醒来了! 带着一身通天地泣鬼神的修为醒来了! 这一次,叶凡要让苍天敬畏!要让大地颤抖! 要执掌一切,登临苍穹之巅!游轮失事,一觉醒来发现自己身处荒岛之上,身边相伴的却是朝思暮想的豪门千金…… 荒岛之上,和女神一起打造我的世界!宋子炎闭关千年后再出关,世界已经物非人非。 就在宋子炎千愁万绪时。 一个七八岁左右的小女孩忽然慌慌张张地跑过来,大喊着“爸爸”“爸爸”。 宋子炎左右看了看,无人。  “小家伙,我可是千年童子身,你别冤枉我。” 小女孩愣了一下,然后瓷娃娃般的脸上写满鄙夷。。。。。。
地府基层员工日常 我那些当特工的日子里 大汉儒尊,诗成传世惊诸圣 熊的孩子 综武世界的大反派 我的系统不一般! 太苍龙神 神兽召唤师 大秦:一剑开天门,被金榜曝光了 主播穿越 玄天灵阁 繁花飞溅正当空 万界收藏家 血修士 回忆那几年 辉煌枭雄 这个城市的回忆 建座地府当后宫 天下珍藏 唯心之传 农业机械毕业论文 能量代谢论文 农林经济管理论文范文 暖通与空调英语论文 农业机械毕业论文 农业清洁生产论文 农民工回乡创业论文 农村环境治理工作论文 农业论文摘要 农村教育现状的论文开题报告 农业发展动态论文 农业保险论文的摘要 你了解的细胞论文 能量代谢论文 农业与园林专业论文 暖通与空调英语论文 农民工回乡创业论文 农业论文摘要 农业供给侧改革 论文 农业与园林专业论文题目 能量代谢论文 女生抢遭抢劫论文 农业供给侧改革的论文 欧式酒店毕业设计论文 农村环境实践论文 你了解的细胞论文 农业论文摘要 农业供给侧改革的论文 农业供给侧改革 论文 农业论文摘要 暖通与空调英语论文 能量代谢论文 女生心理论文 农业与园林专业论文 农业社会主义改造论文 暖通与空调英语论文 女生心理论文 农林经济管理论文范文 你了解的细胞论文 女生抢遭抢劫论文 女性生殖健康论文2000 农村教育现状的论文 农业生态园论文 农业保险论文的摘要 欧式酒店毕业设计论文 能量代谢论文 农业保险论文的摘要 女性生殖健康论文2000 你了解的细胞论文 农发行风险防控论文 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 宗门里连我都是卧底 逆天改命之最强圣人 灰色居间者 寰宇明灭 噬古残芒 百家乐官网 澳门葡京游戏官网 葡京官网 百家乐官网 万利游戏官网 农发行风险防控论文 农业机械毕业论文 农民工回乡创业论文 农发行风险防控论文 南安粮食小论文 农林经济管理论文范文 农业发展动态论文 你了解的细胞论文 农业改革后的发展论文 能量代谢论文 农业供给侧改革的论文 能量代谢论文 女生心理论文 农村环境实践论文 农业论文摘要 农村教育现状的论文开题报告 农业清洁生产论文 女生心理论文 你了解的细胞论文 农业清洁生产论文 能量代谢论文 农业社会主义改造论文 农业与园林专业论文 欧式酒店毕业设计论文 农业与园林专业论文 农业发展动态论文 女生抢遭抢劫论文 农业发展动态论文 农村社会治理论文题目 农业改革后的发展论文