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电话东莞圆通企石电话东莞天天送水服务电话ems兖州电话东莞莞城圆通快递电话查询东莞大朗天天快递电话ems烟台市处理中心电话ems烟台电话查询东莞莞城顺丰快递电话ems盐城处理中心电话东莞中堂中通快递电话东莞莞城圆通快递电话查询ems烟台市处理中心电话ems燕郊业务部电话东莞源心电子电话东莞源心电子电话东莞市塘厦圆通快递电话东莞当纳利联系电话东莞源心电子电话东莞大朗天天快递电话东莞清溪镇中通电话东莞圆通企石电话东莞桥头韵达快递电话东莞万江ems电话东莞清溪镇中通电话东莞市塘厦圆通快递电话ems盐城处理中心电话 超脱,是永恒自在,逍遥无量,是法身净土,妙真如性…。是混沌无尽生灵历经轮回的万世追求,当徐衡超越了本有的命运,把命运一次次地打碎而后重立,最后一弹指间碎灭无穷命运,成为了真正的觉醒者,剥开了超脱的层层迷雾,发现了那超脱后竟藏着这世间的最不可言,徐衡把他叫“超 世 间”! 非常飒的女特战军官退伍后当了一名教师,拯救无可救药的话学生们,还不快来看? 人是否真的有命运?命运谁造成?一名少年天赋异禀,因被手足残害险些命丧他手,不曾想因祸得福在机缘巧合之下寻得仙界神兵。当绝世神兵再现,引仙魔觊觎之时,他又将迎来一场怎样的命运呢?秦琪穿越了,别人带着王霸之气穿越,秦琪则带着一个仓库穿越到三国。 刚入三国,遇上名将高顺、绝世美人貂蝉。 收下! 往返于三国与现代,不断赚取小钱钱。风生水起之际,漂亮国盯上,一怒之下,跑到彼岸肆意掠夺……。 秦琪被一个个诸侯盯上,全不怀好意、肆意敲诈勒索,甚至要将其逮住……。 无奈下,只好走上争霸之路 从此,三国多了个狠人,专抢美人、收名将、名士的诸侯。 易钊意外穿越到了一个人与鬼怪生存的世界,在这里人和鬼怪对立, 而易钊却意外获得了阎王送赠的物理驱鬼系统,从此成为了这个世界的王者。这是一部青春时期的回忆录。每个人的青春都是丰富多彩的,值得可歌可泣的,值得大说特说的,我们富有热血,我们积极向上,我们有过迷茫,也曾失落彷徨,愿你们独一无二的青春,能够得到你们想要的结果,活出自己的自由。 前世,杨羽自暴自弃,整天鬼混,导致妻子女儿惨死眼前。   今生,杨羽仙帝归来。   有仇报仇,有怨报怨,守护妻女,所向披靡!   1987大年三十,母亲出走,父亲被打残废,颓废的三十年转瞬即逝。   意外回到三十年前,张旭要一手扛起本应支离破碎的家庭。   每次他都能把握市场风向,从摩丝到BP机,从实业到互联网,他才是真正的商业教父!   别人跟着历史车轮滚滚往前,而他已经站在终点! 一户人家二百年的风风雨雨
重生之绝世仙尊 满级悟性系统 载物记 流不尽的血 都市绝品医神 修仙:家族崛起 仙路鬼途 游戏规则制造 网游:我在超神空间无敌了 我在异世也当狗? 关于我在海贼世界打工这事 天启,终末时代 神话灵塔 采访:这记者能处,有事他真报 怎么会是我重生啊 凉城小炮灰 锦鲤带我穿越 一把刀一把锤建造我的世界 仙尊归来之重活一世 西游:唐长老,收了神通吧 东莞企石中通快递电话 ems烟台客服电话 ems燕郊业务部电话 东莞源心电子电话 东莞企石中通快递电话 东莞清溪长山头物流公司电话 ems燕郊营业部电话 ems烟台市电话号码 东莞桥头韵达快递电话 ems盐城处理中心电话 东莞大朗天天快递电话 ems扬州电话号码 东莞市上角天天快递电话号码 ems烟台客服电话 东莞天天送水服务电话 东莞圆通企石电话 ems燕郊营业部电话 东莞桥头韵达快递电话 东莞当纳利联系电话 东莞莞城顺丰快递电话 ems烟台客服电话 东莞莞城圆通快递电话查询 东莞旗峰邮局电话号码 东莞中堂中通快递电话 ems烟台市处理中心电话 东莞市上角天天快递电话号码 东莞桥头韵达快递电话 东莞旗峰邮局电话号码 东莞当纳利联系电话 东莞桥头韵达快递电话 东莞圆通企石电话 ems烟台客服电话 东莞莞城中国邮政快递电话 东莞莞城顺丰快递电话 东莞清溪镇中通电话 东莞圆通企石电话 东莞莞城中国邮政快递电话 ems燕郊业务部电话 东莞市上角天天快递电话号码 东莞莞城圆通快递电话查询 东莞万江ems电话 ems烟台幸福网点电话 东莞塘厦申通电话 ems扬州电话号码 东莞中堂中通快递电话 ems烟台客服电话 ems扬州电话号码 东莞万江ems电话 东莞市塘厦圆通快递电话 ems兖州电话 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星游戏官网 道之外:破道之人 天渊辰 二十世纪零十一青春正好 虚拟世界之飞翔的飞猪 我的神级钛合眼 万利游戏官网 欧博游戏官网 欧博官网 万利游戏官网 AG真人 ems烟台电话查询 ems烟台电话查询 东莞莞城顺丰快递电话 东莞市塘厦圆通快递电话 ems烟台市电话号码 东莞当纳利电话 东莞旗峰邮局电话号码 东莞当纳利联系电话 ems盐城处理中心电话 东莞莞城圆通快递电话查询 东莞源心电子电话 ems盐城电话号码 ems燕郊业务部电话 ems盐城电话号码 东莞市塘厦圆通快递电话 ems兖州电话 东莞大朗天天快递电话 ems扬州电话号码 ems烟台市电话号码 ems烟台电话查询 东莞当纳利联系电话 东莞天天送水服务电话 东莞莞城中国邮政快递电话 东莞莞城圆通快递电话查询 东莞桥头韵达快递电话 ems烟台幸福网点电话 ems燕郊业务部电话 东莞清溪长山头物流公司电话 东莞清溪镇中通电话 东莞桥头韵达快递电话