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
图片屏山火车站在哪里玉林到河池宜州火车沈阳延安的火车时刻表长沙到施恩火车票上海到海盐乘火车图片屏山火车站在哪里磁窑至兖州火车站时刻表沈阳延安的火车时刻表上海阳泉北火车时刻表查询k1229火车座次表宜昌东到威海火车时刻表沈阳延安的火车时刻表海林市长汀火车站宜昌东到威海火车时刻表火车票查询官网昆明到深圳k1229火车座次表邯郸到石柱县火车票查询15号天津到北京火车票15号天津到北京火车票张掖西站 电话 火车票吗到临沂站火车列表15号天津到北京火车票上海阳泉北火车时刻表查询集宁到赤峰的火车卧铺广州至昆明火车z211大庆去沈阳火车时刻广州至昆明火车z211集宁到赤峰的火车卧铺张掖西站 电话 火车票吗海林市长汀火车站年少不经事,今朝登天门。周华不小心摸到高压线,被电死,灵魂意外来异世,从此开始了一段异世的奇幻之旅。神仙也要凡人做,然而修真文把修行写的如同魔道,真正的修行不在于声色有形,而在于无形,即使是修魔也不会像修真文那样,真正的修行界应该是什么样的呢?由我的文字给你展开,也由我的心为你们展开 遥望着远方的星辰,恢宏的银河就在那里。 神秘的黄河把李生带到了这神奇的地方,这个有着古老文明的地方江山如画,美人妆! 龙腾万里,乐逍遥! 一个穿越者的灵魂; 一个当代皇者之命魂; 一个身负上天之意的天女; 当三者相辅相成,为天下先,为苍生意。 匡扶社稷,历经磨难。 是宿命的轮回还是这悠悠天意,人力难为; 朝堂,战场,血雨厮杀,阴谋密布; 烽烟过后,张翼回首看向背后孤寂的威威皇朝,看着曾经的硝烟之处,却早已物是人非。 上马提剑定天下,下马安国保苍生。 ps:慢热,有逻辑,不属于小白文,慎重选择。哪怕已经过去了很久很久,和平时代早已来临,他依然时常回想过去,回想起那座燃烧着的边境城市,那团火从那时便引燃了少年炽烈的心,如光,如炬,引领无数拥护者追随他的步伐,用铁与血推动了历史的车轮。社畜石源,闲暇之余,最爱好看免费小说。 他甚至还有一个美好的梦想,躺在家里什么工作都不用做,光靠看免费小说就能迎娶白富美、走上人生巅峰...直到有一天,他看的免费小说里,突然出现一个闪烁着光泽的宝箱,石源下意识便点开。 “你寻到青铜宝箱*1,获得地摊大力丸*5。” “叮..检测到你当日当周阅读时长达标,符合看免费小说就变强系统激活条件,恭喜你获得现金奖励10000,特殊技能过目不忘*1..” “书中自有颜如玉,书中自有黄金屋,看免费小说就变强,拒绝一切套路!” “你寻到黄金宝箱*1,获得可控核聚变技术*1..寻到暗金宝箱*1,获得完整修仙功法*1...” 那一日,一个自称女反派的绝美女人从书中跳出,痛哭流涕告诉石源,战神XX率十万虎贲回归血洗她全家,寻求石源帮助。 石源:“战神是吧?十万虎贲是吧?统统镇压丢进X院照顾战神他全家的生意...” 努力了十年,终于经济独立了,本以为可以彻底甩手享受生活,迟来的系统却逼着他去当个门主。 既然都当门主了,那更加不用那么拘束了,谁让这个宗门这么强呢,你说对吧? 刚准备重生的林墨被系统判定为极其危险的罪恶灵魂,不但拒绝与其绑定,还把他关进了系统空间,这一关就是一千年。 但林墨精神本来就有点问题,而且是个冷血杀手,他在系统空间里没有崩溃自杀,而是找到办法偷学了系统所有力量,最终打破空间。 出来的第一件事当然就是把系统的本体拽出来殴打一顿! 但一码归一码,偷学了系统的力量,也算是和系统完成了绑定,重生到了一个异界大陆的林墨必须要负担起赏善罚恶的重担。 而这对于林墨来说,是一件相当痛苦的事。 全球灾变后六十年,小冰冻期结束,各生活大区政府开始大规模收拢待规划无政府区的土地,重整资源,全面进入了复苏阶段,而这二十年也被称为“黄金二十年”。   这是一个新大区陆续崛起,政治搭台,资本唱戏,野心家遍地走,英雄豪强,奸雄草根并起的璀璨大时代!一位青年带着满腹韬略崛起于乱世,胸藏猛虎,丈量天地。
破碎的大陆 第5纪元 大梁镇妖司 世上只有我一个人类吗 好闹心的游戏 魃气回天 匆匆17年 17岁的年纪 精灵之暗黑潮流 平子寻道 寄名锁 不醉星河 签到:开局被女帝封为帝后 影埋 这只壁虎能遮天 小仙不讲武德 植菌 人逆流芳 我真的没想当卧底 乱时下的尽头 上海阳泉北火车时刻表查询 上海到海盐乘火车 茶陵到衡山的火车时刻表 火车票查询官网昆明到深圳 上海阳泉北火车时刻表查询 永川至重庆北火车时刻表 海林市长汀火车站 宜昌东到威海火车时刻表 到临沂站火车列表 娄底到邵东火车站 磁窑至兖州火车站时刻表 麻城到圻春的火车 塘沽到福州火车票 娄底到邵东火车站 图片屏山火车站在哪里 上海到海盐乘火车 武威到长春的火车时刻 大庆去沈阳火车时刻 永川至重庆北火车时刻表 沈阳延安的火车时刻表 娄底到邵东火车站 火车票查询官网昆明到深圳 玉林到河池宜州火车 宜昌东到威海火车时刻表 k1229火车座次表 塘沽到福州火车票 大庆去沈阳火车时刻 玉林到河池宜州火车 永川至重庆北火车时刻表 大庆去沈阳火车时刻 上海到海盐乘火车 漯河至新疆火车票 长沙到施恩火车票 图片屏山火车站在哪里 集宁到赤峰的火车卧铺 上海到海盐乘火车 长沙到施恩火车票 邯郸到石柱县火车票查询 塘沽到福州火车票 火车票查询官网昆明到深圳 广州至昆明火车z211 茶陵到衡山的火车时刻表 郴州有火车到重庆北吗? 武威到长春的火车时刻 宜昌东到威海火车时刻表 娄底到邵东火车站 麻城到圻春的火车 广州至昆明火车z211 塘沽到福州火车票 磁窑至兖州火车站时刻表 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 白墨劫 熠熠生辉之路 超术人生 因为遇见你这一切才有意见 禁忌收容所 万利游戏官网 欧博官网 皇冠登3出租 万利游戏官网 快连下载 到临沂站火车列表 玉屏至重庆火车时刻表 茶陵到衡山的火车时刻表 集宁到赤峰的火车卧铺 武威到长春的火车时刻 到临沂站火车列表 张掖西站 电话 火车票吗 永川至重庆北火车时刻表 k1229火车座次表 从贵阳到三亚的火车票 k1229火车座次表 上海到海盐乘火车 龙岩-郑州火车 集宁到赤峰的火车卧铺 玉屏至重庆火车时刻表 集宁到赤峰的火车卧铺 广州至昆明火车z211 张掖西站 电话 火车票吗 集宁到赤峰的火车卧铺 k1229火车座次表 张掖西站 电话 火车票吗 沈阳延安的火车时刻表 漯河至新疆火车票 沈阳延安的火车时刻表 郴州有火车到重庆北吗? 长沙到施恩火车票 到临沂站火车列表 磁窑至兖州火车站时刻表 玉林到河池宜州火车 15号天津到北京火车票