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
生小宝宝游戏的神英特战队小游戏生存制作三层蛋糕游戏神秘战士游戏讲的什么什么游戏像侠盗猎车生小宝宝游戏的什么日批游戏最爽生存制作三层蛋糕游戏什么小霸王游戏好玩什么单人游戏好玩十种最萌的游戏生存制作三层蛋糕游戏什么叫运动游戏十种最萌的游戏神秘星球 游戏什么单人游戏好玩什么是海贼王游戏下载不了什么游戏有女兵什么游戏有女兵生小宝宝医院游戏下载什么小霸王游戏好玩的游戏什么游戏有女兵什么小霸王游戏好玩生存方舟小游戏十秒的游戏动作狮子游戏集团十秒的游戏动作生存方舟小游戏生小宝宝医院游戏下载什么叫运动游戏 毕业于南疆理工学院地质系的蒙古族姑娘齐林终其一生破译了祖先留下的金牌上的秘密,找到了蒙古大军留下的东夏国的宝藏,同时也为国家找到了一个大型的有色金属矿藏。齐林男友,小提琴家杨文负气辞去歌舞团副团长职务下海,最终成为作家。武术家林飞的两个孙子,一个成为研究太阳能的军事科技专家,一个成为药物学专家。瞿永明因受贿下狱,他姑娘为了父亲留在南当,通过自己的努力,成功创办了香料公司。范宝忠、范宝德兄弟俩的子女,一个成为私募基金老板,一个成为冶金专家。副市长常伟因害怕组织追究跳楼自杀,朱丽丽因受贿罪坐牢死于狱中。他们俩的私生子,通过自己的奋斗,成了一名钢琴家。杨文的追求者李萍,也成为了著名的舞蹈家。她终身追求杨文,最终无缘,终究只做了好友。本书还描写了南当人民英勇抗日、抗美援朝的事迹。歌颂了南当人民建设自己的家园,努力打造锡文化,把南当建设成为世界锡都的事迹。本书共80万字。古语有云:小隐隐于野,大隐隐于市。身负家族绝学的少年郑朝安,在自己不断进步的过程中,与天下各路高手交流,以自己的眼睛,发现隐藏于世间的高手。武者、修士、匠师、剑修、魔法师、猎魔人·······全天下一直在隐藏着的高手,究竟有多少?我是一个老千,为了报仇,我坐上赌桌,以千术把仇人踢进赌博的深渊。老千生涯,靠赌为生。三教九流,江湖百态。 赌桌上,没有常胜将军,输一次,万劫不复。我惶恐不安,终日焦虑,害怕所有人突然都像儿时那样笑话我,我仿佛置身于一个绝望的深渊。一言定生死,一语变乾坤。苏铭阴差阳错穿越到了御兽世界,熬了十八年终于在御兽天赋觉醒时等来了自己的金手指,超能加点。 资源转化为强化点,可以用来提升自己和御兽的各项数据。 路人:老师,凭啥苏铭御兽和我一样等级,他的体型是我御兽的几倍大。 苏铭:其实是他比较贪吃,长得胖。 路人:老师,不好啦学校塌了,苏铭的那头食铁兽推的。 苏铭:老师,这真不能怪我啊,他就轻轻摸了一下而已。 老师站在废墟之前,看着那头十几米高的食铁兽,正拿着学校避雷针剔牙时愣住了。 “苏铭,你这御兽是精英级别的?!!!!” 2050年,一颗直径超过10公里的小行星落入浪漫之城玛丽安娜境内,随后,地震引发的海啸淹没了第五大陆,全球气候发生剧变,爆炸扬起的尘埃覆盖了天空,遮蔽了太阳,全球温度下降了约15摄氏度,人类陷入恐慌之中。 2051年,武器商人赫尔曼以合众国的名义进入第二大陆东北角的贫穷国家,索尼亚。 2055年,第二大陆被索尼亚统一 2059年,第四大陆,雨林之国森巴的原政府被推翻,新政府上台。 2060年,第一大陆南部国家被不明势力尽数占领。 2061年,第五大陆剩余土地上,除不列颠帝国外,全部沦陷,同年,赫尔曼发表通告,宣布建立人类复兴政府,向现存各国宣战。 同年,世界建立了北部战时联合国,东部战时联合国以及西部战时联合国,向人类复兴政府宣战。 2074年,这是世界变成地狱的13年后,也是故事的开端。 异界的国度妖魔苏醒,那里即将面临生死劫难,轩辕庄就是摆脱生死劫难的寄托。轩辕庄自己在非凡经历得以砥砺成长。在这个世界里,跨界石,是一种神奇的东西。相传上古时期,轩辕姬得之,拥有掌控南北两极之能,所以控磁场,造司南。大禹得之,拥有排山倒海之势,所以治江海。? ?...... 而觉醒职业和灵器,是这里每人都渴望的事。 雪擎,一个被祝福和诅咒同时缠上的少年,即将开启一段传奇之旅...... ?本人心血来潮,想写一部属于关于自己编著的世界。第一次写文,望读者们多多包涵
我,洪荒人祖,打造最强人族 无向之上 术创世之末日篇一 和她一起办案的日子 小男人,大天子 砯崖 元宇神话纪年 马嘴不对牛头 艾特侦探所 玄幻:本坐从不杀生 兵王闯三国1 爽!时空淘宝让我成为人皇 关于我复仇左拥右抱这件事 神仙带我到洪武 soul只是偶然遇见 九转金莲 替劫系统:我要成仙 时间空气是什么,我不在意 我笑修炼是坐牢 带着系统穿越电影世界 狮子吃了几块钱游戏 什么3d手游戏最好玩 什么是海贼王游戏下载不了 什么游戏像侠盗猎车 狮子吃了几块钱游戏 湿妹子游戏 什么是海贼王游戏下载不了 什么公主时尚店游戏 狮子游戏集团 什么公主时尚店游戏下载 十八层地狱的游戏 十八层地狱的游戏 生小宝宝医院游戏 什么3d手游戏最好玩 生小宝宝游戏的 什么游戏像侠盗猎车 什么是换个网页游戏 狮子游戏集团 圣诞老人皱妓门游戏 生存制作三层蛋糕游戏 什么3d手游戏最好玩 神秘星球 游戏 神英特战队小游戏 十种最萌的游戏 什么单人游戏好玩 生小宝宝医院游戏 狮子游戏集团 神英特战队小游戏 圣诞老人皱妓门游戏 狮子游戏集团 什么游戏像侠盗猎车 十种最萌游戏 神秘战士游戏讲的什么 生小宝宝游戏的 生存方舟小游戏 什么游戏像侠盗猎车 神秘战士游戏讲的什么 什么是海贼王游戏下载不了 生小宝宝医院游戏 神秘星球 游戏 十秒的游戏动作 什么公主时尚店游戏下载 蛇形走游戏 什么是换个网页游戏 十种最萌的游戏 什么3d手游戏最好玩 十八层地狱的游戏 十秒的游戏动作 生小宝宝医院游戏 什么日批游戏最爽 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 这个皇帝有点六 亏成首富从民国开始 秦明法神 风流董事长的男助理 爷爷:你真带着地府打天堂 万利官网 欧博官网 皇冠登3出租 万利官网 欧博官网 什么单人游戏好玩 什么叫运动游戏 圣诞老人皱妓门游戏 什么奶奶都的游戏 什么公主时尚店游戏 什么是海贼王游戏下载不了 神秘战士游戏讲的什么 生小宝宝医院游戏 十秒的游戏动作 十八层地狱的游戏 什么日批游戏最爽 什么小霸王游戏好玩 生小宝宝医院游戏 圣诞老人皱妓门游戏 什么小霸王游戏好玩 什么单人游戏好玩 什么小霸王游戏好玩的游戏 狮子吃了几块钱游戏 生存制作三层蛋糕游戏 狮子游戏集团 圣诞老人皱妓门游戏 生存方舟小游戏 什么叫运动游戏 什么日批游戏最爽 什么奶奶都的游戏 生小宝宝医院游戏下载 湿妹子游戏 蛇形走游戏 十种最萌的游戏 什么3d手游戏最好玩