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
z139火车下铺价格遵义与贵阳火车票最新昆山火车站火车时刻表从临沂到南通坐火车怎么走南宁东--防城港火车z139火车下铺价格昆明梅州火车站时刻表最新昆山火车站火车时刻表武昌到龙岩火车多久长沙到六盘水普通火车太原k7808火车在哪坐z139火车下铺价格德州到重庆的火车最佳方案太原k7808火车在哪坐最新昆山火车站火车时刻表长沙到六盘水普通火车容县火车路线南宁东--防城港火车南宁东--防城港火车锡林浩特到临沂火车通辽火车站到哲里木站火车6415武昌到龙岩火车多久新乡到太原火车时间表天津西站至达州火车票曹县到五莲火车从临沂到南通坐火车怎么走玉屏到铜仁火车票价锡林浩特到临沂火车广州北到耒阳的火车时刻表星宇来到幻生界后,和自己的小伙伴继续遨游于世界之中,在这期间他们又会遇到哪些挑战?又会结交到哪些朋友?顾逍遥的一剑门会重回巅峰吗?他们在幻生界又会发生哪些故事呢……图书管理员穿越成废帝刘辩,没地盘没资源没人才,那又怎么样。手握超级召唤系统,文臣猛将会聚一堂,青梅煮酒论英雄。废柴?退婚?绑定作死系统?作死就能变强? 叶天尘:想当年作死的过程多么快乐,可是一晃眼…… 轰隆隆!(仙帝法决袭来) 叶天尘:还是那么快乐! 只要杀不死我,我就能变强穿越【大武神】世界,成为一名外门魔教弟子,本以为这辈子彻底废了,没想到金手指到账了。 开局老天爷赐了一双慧眼,可以查看人生剧本! 随手在地牢捡了一名被关押的圣地女弟子,竟是女皇遗孀… 【姓名】:慕卿颜 【修为】:气武境八重 【命格】:女皇遗孀(紫)、天命皇运(紫)、皇朝气运(紫)、旺夫(紫)、主角光环(紫)寒冰女武神转世(紫) 【天命值】:85 【人生剧本】:《大武神》女主角 【好感度】:0 【近期天命机缘】:五个月后,皇灵教廷被攻陷…… … … 路上随手查看一名魔教弟子! 【姓名】:韩龙 【修为】:灵武境六重 【命格】:天命配角(蓝) 【天命值】:16 【人生剧本】:《大武神》天命反派狗腿子 【好感度】:-15 …… …… 随着人生剧本开启! 天命大反派,天命主角,天命配角,一一浮出水面!一个在地球一事无成的青年在准备跳楼结束自己时,被域外神选中,最后成为了一宇至尊一位家境贫寒的少年,经历了常人难以想象的苦难,磨砻砥砺,奋发向上。好不容易华丽转身,完成了人生意义上的大逆袭,一时平步青云,风光无限! 这期间,少年也先后得到了好几位绮年玉貌少女的青睐,演绎出许许多多荡气回肠,缠绵悱恻的爱情故事。其中的情与理,是与非,仇恨与挚爱,痛苦与欢乐,人性与心魔,交互编织成一道道直逼心灵拷问的风景,让人热血沸腾又扼腕长叹!人生无常,大肠包小肠。 孟飞穿越到漫威世界,成为中城高中的一名高中生。 并且绑定签到系统,开局签到终极帝皇铠甲。 在哥伦比亚研究院签到,获得三星奖励,兔符咒。 在复仇者联盟大厦签到,获得四星奖励,镭射眼。 在联合国总部大楼签到,获得五星奖励,暗影军团。 …… 两年后,当灭霸带着他的紫薯兵团入侵地球时。 只见地平线上亮起一道耀眼的光芒……你所处的世界说不定是别人的垃圾堆 菩萨低眉,所以慈悲六道! 撒旦低头,所以血流成河! 以撒旦之名,专职杀戮,他要当最强的那个男人! 最燃的都市,且看一个男人如何成就霸业,成为傲立巅峰的一代传奇!   【七少出品,铁血霸气】 撒旦军团群:198247503 穿越到玄幻世界的周成感觉欲哭无泪,他筑基整整十五年,还是没办法突破到金丹境界,这是何等的悲催! 连系统都对他无语了———说周成没有修仙的资质吧,他是真的没有资质,身体吸收不了天地灵气,根本就没办法突破到金丹境界,但是他在十五年吃系统给的数不尽的筑基丹堆积下愣是把筑基筑到了九百九十九层,就很离谱好吧! 不仅如此,他还成功地肉身成圣了,并且学会了像缩地成寸、无视万毒、一拳把人轰得灰飞烟灭等等诸多牛气哄哄的法门。 周成:“别的我都还能理解,系统你能告诉我为什么你给我的筑基丹是芥末味的吗?天知道我是怎么过这十五年的!整整十五年! 万幸在作者大大的安排下我终于要结束这十五年隐居山林的苦日子,遨游玄幻世界了,感谢作者,感谢读者大大,至于系统你,那就算了吧,尽不干人事。” 系统:“我本来也不是人,啦啦啦~”
仙帝陛下别闹 狂想三国 法元神 蓝星求生 重生:我是一只科技狼 凡人觅仙 从杀妖开始 星云上将 血夜之上 女帝修仙路上的绊脚石 应是如此江山 废柴的重生日记 永黯星痕 半身地狱半人间 伊沌 这个召唤师不太纯 绝世云尊 无字天书之仁武天下 俗人之算无遗策 血色演绎 曹县到五莲火车 长沙到六盘水普通火车 容县火车路线 南宁东--防城港火车 遵义与贵阳火车票 玉屏到铜仁火车票价 西宁至西峡的火车票 无锡交通火车站到青龙山 浙江瑞安有没有火车站 德州到重庆的火车最佳方案 菏泽市到惠州的火车 菏泽市到惠州的火车 新乡到太原火车时间表 长沙到六盘水普通火车 z139火车下铺价格 天津西站至达州火车票 上海到汕头火车票高铁 曹县到五莲火车 贵州到宣威火车票 最新昆山火车站火车时刻表 璞阳到聊城的火车 最新昆山火车站火车时刻表 贵州到宣威火车票 火车6415 23号公主岭到长春火车几点有 汝州到安康火车票 曹县到五莲火车 贵州到宣威火车票 通辽火车站到哲里木站 曹县到五莲火车 南宁东--防城港火车 璞阳到聊城的火车 从临沂到南通坐火车怎么走 z139火车下铺价格 新乡到太原火车时间表 天津西站至达州火车票 从临沂到南通坐火车怎么走 西宁至西峡的火车票 新乡到太原火车时间表 发往周口的火车 天津西站至达州火车票 无锡交通火车站到青龙山 锡林浩特到临沂火车 上海到汕头火车票高铁 太原k7808火车在哪坐 璞阳到聊城的火车 菏泽市到惠州的火车 天津西站至达州火车票 汝州到安康火车票 容县火车路线 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 濒临毁灭,在末世拯救世界 民间故事诡异 阴阳界之仇仙 小叶子的幸福生活 烬盛理想 葡京官网 欧博官网 亚星管理平台 AG真人 皇冠登3出租 火车6415 昆明梅州火车站时刻表 太原k7808火车在哪坐 天津西站至达州火车票 长沙到六盘水普通火车 新乡到太原火车时间表 锡林浩特到临沂火车 汝州到安康火车票 无锡交通火车站到青龙山 璞阳到聊城的火车 德州到重庆的火车最佳方案 通辽火车站到哲里木站 遵义与贵阳火车票 德州到重庆的火车最佳方案 天津西站至达州火车票 贵州到宣威火车票 玉屏到铜仁火车票价 浙江瑞安有没有火车站 上海到汕头火车票高铁 昆明梅州火车站时刻表 汝州到安康火车票 火车6415 长沙到六盘水普通火车 太原k7808火车在哪坐 z139火车下铺价格 菏泽市到惠州的火车 遵义与贵阳火车票 最新昆山火车站火车时刻表 发往周口的火车 z139火车下铺价格