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
廊坊三河远东驾校电话莱阳平安驾校官网乐山健为.学驾校多少钱南京哪儿驾校聋人学车莱西莱运驾校撞死人了?廊坊三河远东驾校电话莱西运安驾校位置乐山健为.学驾校多少钱莱阳莱运驾校电话号码莱西有几家驾校莱西新驾校廊坊三河远东驾校电话莱西运安驾校教练图片莱西新驾校乐山健为.学驾校多少钱莱西有几家驾校莱西运安驾校校长莱西哪个驾校可以学b2莱西哪个驾校可以学b2蓝田通达驾校在哪考试莱阳平安驾校分校好吗莱西哪个驾校可以学b2莱阳莱运驾校电话号码兰州宏源驾校电话莱西莱运驾校撞死人了?莱阳平安驾校校长范南京哪儿驾校聋人学车莱阳市平安驾校蓝田通达驾校考场莱西运安驾校教练图片天生至尊,为人族斩妖除魔!护人族万垂不朽!江宇泽前世遭兄弟的反水,亲朋的质疑,爱人的背叛,不幸陨落。烟消道散之时,竟发现在这大千世界之中,源灵大陆只不过是一粒尘埃。万年后得以重生,挖掘新的力量,开创新的规则,以源灵大陆为基础,向未知探索!在这个巨大的异界大陆上,到处都是权力的争夺,封建主义皇位之间的暗潮涌动,一个在登基典礼上就被罢黜的懦弱皇帝,怎样走上复仇之路......长白神庙,尸海迷巢,冥峡天棺,黄泉九鼎…… 一件来历不明的人皮寿衣将我拖入一个巨大的旋涡之中。 为了活命我必须借寿前行,活人的寿要借,死人的寿更要借。 当我以为自己可以彻底摆脱那件寿衣的时候,才发现这场阴谋刚刚开始,而我只是其中的一枚棋子……这个世界四方各有一处释放真气之地,分别被四族占领,万年前四族大战,人族最终获胜,将三族真气封印,后又建龙脉于中原,吸收四族真气,使其他三族永无翻身之日。万年后,人族中各个帮派、教门林立,世界各处更是异象频现。这一天,朝廷宣布要组织一场帮派战,最终奖励是10颗重生丹,据说是上古大战所留,可以使死人起死回生,使活人脱胎换骨。江湖上各个帮派、教门摩拳擦掌,跃跃欲试。与此同时,江湖上一个新的帮派“天下第一帮”已经悄然崛起。这到底是一场机遇还是一个阴谋?乱世之中,烽火天下,他一朝穿越,却是个落魄秀才,要啥没啥,更倒霉的是他还被山贼找上门来; 落魄不要紧,钱我可以自己挣。 什么?没处挣?那就去抢。 至于山贼?更不用怕,正好抢了他们的财物做军资。 我相信,总有一天我林东的名字会响彻整个大明。 总有一天,我林东能挽狂澜之将倾,扶社稷之即倒,延续我族千年文明!一个来自监狱的少年,十八岁生日那天获得了一个超级监狱系统。 可是,这个系统里都是些什么乱七八糟的东西啊? 溜门撬锁?——拜托,卿本佳人奈何做贼啊! 刨坟掘墓?——喂喂喂,那可是陵迟之罪,要满门抄斩挫骨扬灰的好吧? 赌术?——好吧,这东西总算还有点儿用,不过听说开赌场的都是黑老大? 枪术和拳法?——老子身经百战横扫怒水监狱无人敢惹,我还需要学这个? 跟罪犯交流的宝贵机会?——你以为小爷我从小生活在监狱是跟公知和大学教授打交道么 ? 三观不正的监狱系统和无节操无下限的少年,能擦出什么样的火花? 只因发现了院长不为人知的秘密而被院长开除,重返武院后开始了和院长斗智斗勇的故事……先别感到无趣,这,只是我传奇一生的开始!这是一个关于已经打败最终BOSS的家伙的故事,但他并不是一个英雄。李一是个从小受过高等教育崇尚科学的人,虽然他祖父解放以前是个有名的阴阳先生,可他却从不相信鬼神之说,直到他遇到的一些诡异的事情后才改变了他的观念,靠着从其祖父那里得到的一本经书开始了他精彩的人生!王宇重生成白蛇,已经不知道多少年了。 只不过这么久以来,大多数的时间都在睡觉。 睁开双眼。 此世妖魔横行世间,视人族为食粮。 天上仙人高高在上,垂钓人间气运,乱世间纲常。 民不聊生,皆为刍狗。 王宇盘在自己的山神破庙前,心中絮叨: “我为骊山山神,自会保你们平安。” “但谁能告诉我。” “这个刘邦的女孩,为什么会是我的祭品?” “历史上刘邦是斩骊山白蛇的!”
围猎游戏 世道变了 元宇宙:明日之战 魔法世界的修仙者 黑魔法使 龙道传奇 全职体验系统 今天又是在师门垫底的一天 九牧 凰烬传 逆境挣扎之掀翻世界 我在登基典礼上被截胡了? 我进入异界开始修行之旅 青春之我 路上行记 神秘复苏:我横练无敌 斗篷大帝重生之崛起世纪 寻天界 留香传 真武三国 莱阳平安驾校图 莱西有几个驾校 莱西运安驾校校长 莱西哪个驾校可以学b2 莱阳平安驾校图 莱阳平安驾校总校电话 莱阳驾校vip 莱西运安驾校b2 莱阳平安驾校校长范 莱西运安驾校教练图片 莱阳莱运驾校电话号码 莱阳莱运驾校电话号码 兰州宏源驾校电话 莱西有几家驾校 廊坊大厂有什么驾校 莱西莱运驾校撞死人了? 莱阳驾校vip 莱阳平安驾校校长范 莱阳平安驾校分校好吗 廊坊三河远东驾校电话 莱西有几个驾校 乐山健为.学驾校多少钱 莱阳平安驾校官网 莱西市运安驾校 莱西运安驾校b2 兰州宏源驾校电话 莱阳平安驾校校长范 莱阳平安驾校官网 莱阳平安驾校分校好吗 莱阳平安驾校校长范 莱西哪个驾校可以学b2 莱西有几个驾校 南京哪儿驾校聋人学车 廊坊三河远东驾校电话 兰州宏源驾校电话 莱西莱运驾校撞死人了? 南京龙江天保驾校 莱阳驾校vip 兰州宏源驾校电话 南京龙江天保驾校 莱西莱运驾校撞死人了? 莱西运安驾校教练名单 蓝田通达驾校在哪考试 莱阳莱运驾校报名电话 莱西市运安驾校 莱西有几个驾校 莱阳莱运驾校电话号码 南京哪儿驾校聋人学车 蓝田通达驾校考场 莱西运安驾校位置 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 致五月的冬天 破晓:黎明之战 如来密码 万界主宰宗门 当神话出现 澳门葡京官网 AG真人 欧博官网 澳门葡京官网 欧博官网 莱西有几家驾校 南京龙江天保驾校 廊坊三河远东驾校电话 莱西运安驾校位置 南京龙江天保驾校 莱西哪个驾校可以学b2 莱西运安驾校教练图片 莱西哪个驾校可以学b2 莱阳市平安驾校 莱西新驾校 莱阳市平安驾校 莱西运安驾校教练图片 莱阳莱运驾校电话号码 南京哪儿驾校聋人学车 莱阳平安驾校官网 南京哪儿驾校聋人学车 莱西运安驾校教练名单 莱西哪个驾校可以学b2 南京哪儿驾校聋人学车 莱阳莱运驾校报名电话 莱西莱运驾校撞死人了? 莱西有几个驾校 莱西运安驾校校长 莱西有几个驾校 莱西市运安驾校 莱西运安驾校b2 蓝田通达驾校考场 莱阳平安驾校图 廊坊大厂有什么驾校 莱西运安驾校网