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
北下关街道办事处 电话中通快递惠济区电话中通快递客服电话没人接中通快递快件查询电话德惠天天快递电话号码北盛ems快递电话中通河南客服电话中通快递客服电话没人接中通济南天桥二部电话佛山南海盐步邮政快递查询电话佛山高明申通电话北下关街道办事处 电话中通杭州中转部 电话佛山东胜村电话中通快递客服电话没人接佛山南海盐步邮政快递查询电话中通虹口三部汶水东路电话凤台县医院电话号码凤台县医院电话号码北厍中通快递电话中通快递黄石国贸电话号码凤台县医院电话号码中通济南天桥二部电话中通快递尖山区电话德惠天天快递电话号码中通快递济南工业南路分部电话中通快递快件查询电话中通快递加盟咨询电话北厍圆通快递电话中通杭州中转部 电话最近王诺家里的镜子好像有点不对劲。 有时在东边,有时却在西边,好像又在北边....... 不仅镜子里映出的家具位置发生了变化,而且镜子里的自己好像也越来越陌生了....... 镜中的“他”目光由窥探变成了贪婪。 镜子里的你,真的是你吗?特战精英深入敌后昆捣毁了敌人的雷达站,在敌人的导弹轰击下昏迷被俘,从此开启了为被俘士兵雪耻,捍卫华厦掘起的征程。 在一个架空历史的现代社会, 生活着不同的奇能异人, 他们为各种势力服务。 而主人公江河原本只是贵族学校富二代李飞飞的伴读书童, 阴差阳错地成为了洪门大佬。 身份的改变也让他陷入更大的阴谋旋涡中。 他凭借着天语目录改写命运, 打败了一个又一个黑暗势力的阴谋。一天高二学生王羽被奶奶叫回家中,告诉了他世界的真相和家族的秘密,从此走上修真之路女主维枫的成长与冒险的故事少年陈枫身怀绝世神器,修盖世魔功。战人界、屠魔界、挑仙界、冲神界。打遍诸世界,杀出冲天血路,成就无上至尊。(声明:新书发布,各位新老书友多多支持。群号:158697732)一个人,一座城,一段不朽的传奇,一步一步走向最高的巅峰。在川省的一个二流大学中,梁凡和室友们正在为毕业论文感到发愁,此事他却听到了系统的提示。“系统已激活,见面奖励一......”就此开启了自己的逆天人生建筑集团老总许勇,穿回到1986怂人狗娃的身上。 前后两世记忆一融合,他瞬间变得强大。 拳打村霸,棒扫混混英雄救村花。 夜总会遇伯乐,他的人生从此开挂。 组建乡村建筑队、办醋厂、种果树。 直到集团公司上市。 用超前三十多年的人生经验赚这个时代的钱,岂不是很容易? 看《超级农民工》为自己补办一场错过的人生盛宴。这片大陆上生活着许多种族的生物,有技术,职业多样化的人族,以暴力和野蛮著称的兽族,象征着绝望与杀戮的魔族,代表智慧与生命的树人族,精修于魔法和圣术的精灵族,以及凌驾于这一切之上的——神族,主角在一次砍柴归家后亲眼目睹了自己的家乡化为灰烬,自己至亲的人被一个一个的抹杀掉,从那时起,他便下定决心要变得强大,变得强大到足以守护自己所深爱着的每一个人.....,这个名为李弋的男孩要在这篇大陆上,书写属于自己的史诗。
人帝: Human emperor 金灵神剑诀 北风之神 最上是魔 讨孙平叛传 大恒平妖录 乱世剧情 4号 我的前世记忆之太古山海 无限世界:请君入梦 我叫徐无为 超能s特队 六国:起始 射仙问道 默契的伴侣 阳监事务所 战荒原 我在异世开荒种田 暮洛书签 小白是条狗 中通快递吉州城南分部电话 佛山高明申通快递电话 中通虹口三部汶水东路电话 凤台县医院电话号码 中通快递吉州城南分部电话 中通快递济宁三部电话 中通湖南岳阳平江长寿的电话 中通哈尔滨电话 中通快递济南工业南路分部电话 中通杭州中转部 电话 中通济南天桥二部电话 中通吉水电话号码 中通快递尖山区电话 佛山南海盐步邮政快递查询电话 北盛ems快递电话 德惠天天快递电话号码 中通湖南岳阳平江长寿的电话 中通快递济南工业南路分部电话 中通快递黄石国贸电话号码 北下关街道办事处 电话 佛山高明申通快递电话 中通快递客服电话没人接 中通快递惠济区电话 佛山东胜村电话 佛山南海盐步邮政快递查询电话 中通快递尖山区电话 中通快递济南工业南路分部电话 中通快递惠济区电话 中通快递黄石国贸电话号码 中通快递济南工业南路分部电话 德惠天天快递电话号码 佛山高明申通快递电话 中通快递快递到哈尔滨给谁打电话 北下关街道办事处 电话 中通快递加盟咨询电话 德惠天天快递电话号码 中通快递快递到哈尔滨给谁打电话 中通虹口三部汶水东路电话 中通快递尖山区电话 中通快递快递到哈尔滨给谁打电话 德惠天天快递电话号码 中通哈尔滨电话查询 北厍中通快递电话 中通吉水电话号码 佛山东胜村电话 佛山高明申通快递电话 中通吉水电话号码 中通快递快件查询电话 北厍圆通快递电话 中通河南客服电话 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星游戏官网 穿越在崩坏从死士开始 丧尸国度:生存之道 废材少年的一生 武神修炼日记 玄幻:一界之尊 皇冠登3出租 澳门葡京游戏官网 澳门葡京官网 皇冠登3出租 亚星官网 中通吉水电话号码 中通湖南岳阳平江长寿的电话 佛山高明申通快递电话 北厍圆通快递电话 中通快递客服电话没人接 佛山南海盐步邮政快递查询电话 中通哈尔滨电话查询 佛山南海盐步邮政快递查询电话 中通快递吉州城南分部电话 中通哈尔滨电话 中通合肥滨海电话号码 中通快递惠济区电话 佛山东胜村电话 中通快递快件查询电话 中通湖南岳阳平江长寿的电话 中通快递加盟咨询电话 北厍圆通快递电话 中通快递尖山区电话 中通快递欢乐谷电话 佛山高明申通电话 中通哈尔滨电话查询 北厍圆通快递电话 中通快递惠济区电话 中通快递欢乐谷电话 中通快递快件查询电话 中通快递黄石国贸电话号码 中通快递济宁三部电话 中通快递客服电话没人接 中通快递济宁三部电话 中通河南客服电话