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
1278火车两座座位号宁安到哈尔滨火车费邯郸之定州火车票乌海至米脂火车时刻表福州到南昌火车价格1278火车两座座位号菜园坝火车站取火车票邯郸之定州火车票火车堂 下载去往北京的列车火车网今天新沂到郑州的火车1278火车两座座位号重庆至丰顺火车票今天新沂到郑州的火车邯郸之定州火车票济南到通州区火车票郓城县到菏泽市火车福州到南昌火车价格福州到南昌火车价格重庆到海口火车线路火车时刻表1264自贡火车站59年火车堂 下载菏泽 龙岩 火车南阳--常州火车日照至兖州的火车几点的乌海至米脂火车时刻表兴安到南宁的火车重庆到海口火车线路耒阳至广州北的火车票李杰加入了密逃团,可以正式出道了。他会发生什么事情呢?九幽冥天,以血铸剑,镇鬼邪神,敕怪妖仙! 上一世,他乃九幽剑帝,登临万界,杀伐随心,却因功参造化,遭强敌围攻,肉身殒灭,记忆被封。 这一世,他乃叶家少主,一朝沦为废人,被天下嘲笑,又惨遭岳父和未婚妻剥骨夺魂,死于非命! 一柄夺天地造化的无上剑魂,解开了两世被尘封的记忆! 叶无踪猛然发现,体内剑魂,早已完成了华丽蜕变,晋为神阶,并在他的丹田之中,开辟出了一方神秘剑冢! 由此,叶无踪一人一剑,强势崛起,踏天而行! 吾之剑冢,乃万剑墓葬,可执天下之剑!也可统御,天下执剑之人! 文青版:孤侠隐市井,愿为府中吏;朴剑表无华,寒光映残血;北国千里客,庆南有佳人;白衣映红雪,青丝落云肩;宁断侠剑意,今世不再离……剑兮侠兮,玉京三千客;情兮梦兮,伊在阑珊处! 直接版:我一个剑客,现在在庆南府做公务员,每天就是巡巡街,审审犯人。苏家无极塔试炼中,被打落天裂深渊的苏志宇,却因祸得福,意外成为无极号飞船的第二位船长。学宇宙顶级剑法,装备宇宙顶级的“虚空之源”引擎。 等离子炮。歼星炮,光子武器。概念武器,各种宇宙尖端技术。我都要了。 我要玩转诸天万界。 从此命运改变......一个教师从校园看世界,看人间百态,看人情世故,真实到只剩下生活。一缕天魔残魂为引,带领一个意外来到这个世界的特种兵,走上修仙之路,在魔族圣主的布置下,慢慢走上与仙帝的对抗之路。历经艰险,在生死徘徊之际,觉悟天道有缺,最终战胜天帝,圣主。回归家园。一个最美的修真时代,一个荡气回肠的修真世界,快来与他一起踏上这修真之旅!36岁的江左,把生活过得一团糟,正当他在懊悔时,突然回到了20年前,他重生了!由此他开启了他的开挂人生!XX年间,天下大乱,群妖四起,官兵横行,百姓民不聊生。 天上众神,心疼百姓,特派紫微星下界,斩妖除魔,匡扶正义,救黎明于水火。 紫微星领命,下到人间,化身一名女子,隐居山间,观察人间百态,看遍民间疾苦,可悲可叹!175公分的江朝被篮球队拒绝以后,伤心不已。 就在他绝望之时,开启了【最强球星系统】,从此走上称霸球场的道路,如果一个球员三分神准,后仰美如画,身体素质号称人类最强,那这个球员一定是江朝。
风水易博术 都市皇途 十大动漫名场面:开局夜凯 只为一个承诺 超级人工智能 兄弟走过的传奇人生 我的兄弟是战神 他来自蛮荒 大哥,我没惹你吧? 小叶子的幸福生活 诡秘契约 系统:打造最强神兵 暗线之王 灾厄降临:我能召唤万界 龙纹战神 重生:玻色子生命体 我,范马孔子门徒,以德服人 木鱼僧 我的影子瞒着我,偷偷无敌 穿越然后成为异世龙主 日照至兖州的火车几点的 济南到通州区火车票 山阴到晋城的火车 福州到南昌火车价格 宁安到哈尔滨火车费 兴安到南宁的火车 山阴到晋城的火车 佛山到南丹火车票查询 榆林至安康的火车 重庆至丰顺火车票 无锡到襄阳如何转火车站 无锡到襄阳如何转火车站 菏泽 龙岩 火车 济南到通州区火车票 1278火车两座座位号 南阳--常州火车 广州南有无到全椒火车票 日照至兖州的火车几点的 从龙岩到桂林的火车 邯郸之定州火车票 如何查询火车票下铺价格 邯郸之定州火车票 从龙岩到桂林的火车 自贡火车站59年 去往北京的列车火车网 大同到岱岳火车时间 日照至兖州的火车几点的 从龙岩到桂林的火车 从龙岩到桂林的火车 榆林至安康的火车 福州到南昌火车价格 如何查询火车票下铺价格 乌海至米脂火车时刻表 1278火车两座座位号 菏泽 龙岩 火车 南阳--常州火车 乌海至米脂火车时刻表 山阴到晋城的火车 菏泽 龙岩 火车 火车k885晚点 南阳--常州火车 佛山到南丹火车票查询 重庆到海口火车线路 广州南有无到全椒火车票 今天新沂到郑州的火车 如何查询火车票下铺价格 无锡到襄阳如何转火车站 南阳--常州火车 大同到岱岳火车时间 郓城县到菏泽市火车 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 起始黎明 这个医生有点憨 我让你开店你在末世当财迷 走出黎明 龙心大陆第一神帝 欧博官网 百家乐官网 亚星管理平台 欧博官网 亚星管理平台 福州到南昌火车价格 1278火车两座座位号 邯郸之定州火车票 菏泽 龙岩 火车 重庆到海口火车线路 榆林至安康的火车 南阳--常州火车 济南到通州区火车票 火车时刻表1264 菏泽 龙岩 火车 郓城县到菏泽市火车 宁安到哈尔滨火车费 重庆至丰顺火车票 重庆到海口火车线路 火车堂 下载 福州到南昌火车价格 福州到南昌火车价格 从龙岩到桂林的火车 宁安到哈尔滨火车费 无锡到襄阳如何转火车站 大同到岱岳火车时间 日照至兖州的火车几点的 乌海至米脂火车时刻表 1278火车两座座位号 火车堂 下载 兴安到南宁的火车 今天新沂到郑州的火车 从龙岩到桂林的火车 南阳--常州火车 火车堂 下载