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
古乐器合成游戏古代皇帝的游戏古乐器合成游戏关于步步惊心的游戏关于仓鼠游戏大全古典钢琴家游戏怎么玩孤独的守望者游戏古乐器合成游戏宫廷妃子的游戏。孤岛求生户外游戏古装在线换装游戏古乐器合成游戏故意谋杀3游戏关于仓鼠游戏下载古装穿搭小游戏下载孤岛求生户外游戏关于电眼游戏关于仓鼠游戏大全集关于仓鼠游戏大全集古代做官手机版小游戏?m斗橙光游戏关于仓鼠游戏大全集宫廷妃子的游戏。古代小朋友游戏介绍关于仓鼠游戏大全古代漫画打屁股的游戏大全视频关于步步惊心的游戏古代小朋友游戏介绍古代做官手机版小游戏故意谋杀3游戏大国脊梁,重伤失忆! 都市人生,重新开启! 我叫林凡,也叫林无双! 强悍女友,总想为我遮风挡雨,但她不知道的是,都市人生,我才是真正的王!!!大家好,我是伍浩,我的人生最巅峰是成为一家上市公司的COO,而当事业进入稳定期时,我的噩耗也来了...在未来的某一天,一个人生极其平凡的青年被选中参与一项实验,他置换到了一处平行世界。新的人生并没有给他带来什么,宇宙有多浩瀚,他就有多孤独。后来,他发现自己最想做的竟是回到原来的世界。当午夜的钟声响起,诡秘撕开黑暗的面纱,夜行人间。 沉寂林中尸体搭建的小屋,挂满无头死尸的参天巨树,凭空塌陷的万米巨坑中传来谁的吟唱? 尸骸朝圣,百鬼夜行 ,凝固的海…… 异境层出不穷。 羊头人,豚蛇,祸猪,俎肢异形,黄昏巨人,亵渎暴君坎加厄…… 一个个诡异生物于罪恶晦暗中诞生,屠戮人间。 少年王也发现他有一个可以进行角色扮演的黑暗世界,在这里,他可以挑选这个世界存在的……怪人进行角色扮演,获得他们的能力。 火人杰克,地鸣戈加顿,黑暗哥特加尔,面具柯暮以及那黑夜之上的死神耶格利特…… 这是一个人与邪异共存的世界。 罪恶祸乱人间,牧户一战中让王也知道了自己需要承担的责任。 他的心态由此发生转变。 他将握着黑夜世界,化为暗暮中的野兽,以最凶残的姿态撕裂罪恶!法师们目空一切,贵族们高高在上,大商会只手遮天;在这人吃人的世界里,我看到了深渊的触角,文明的退化,和微弱的希望。 道尘本是一个毫无灵根的废柴,注定无法修炼,但是他确实一个顶级富二代,本以为,就只能平平淡淡的渡过这一生,可谁都没想到,他在一次濒临死亡时,发现了自己的真实身份,从此开启了他这传奇的一生……别人笑我太疯癫,我笑他人看不穿。 一个北宋戏本里的纨绔加反派,面对正义的惩罚、面对其他反派的排挤,用不羁的行为荒唐应对。 面对忠臣的指责,曹斌表示,我虽身在曹营,心却属汉,请不要叫我曹贼。 每个人都有属于他的气运,而这股气运会在冥冥之中影响着他的道路与未来。 命中注定你是个主角,那么你就会走上属于主角的道路,哪怕你不愿意,也无法拒绝。 你唯一能选的,是决定这条路该怎么走。 喜剧型男主角,逗逼型男主角,热血王道男主角,在或者是悲剧型男主角? 他们有的选,但秦宇没有,因为他的气运不是什么主角,而是一个反派!纯粹的反派! 大哥!以前我没得选!现在我想当个好人啊! 在地星上遭遇了流星降落意外死亡的王丑魂穿到了平时世界的另一个年少的自己身上.... 嗯?这个世界的人都拥有精神力?还能和异兽签约?看我王丑如何在这个异世界潇洒四方...... 一点蓝光,开启了新的人生。 阴险诡诈,谁能辩我正邪? 终生坎坷,临了身旁何人?
末日成就,从精神病院开始 来自虚空的低语者 我的27岁女总裁 传奇异术:把我送来当废物 李琦的UFC综合格斗之路 落尽天因 持剑傲天 这个皇帝有点六 神秘维度 媒介收容所 妖魔复苏:开局强拆镇妖观 我永生不灭 一只骷髅的科研进化路 探灵密录 大罗之上 三国:砍我!拼团秒杀刘备! 妖界1 虚无仙神 重生之修罗大帝 莫如歌 古代娃娃换装游戏 孤岛生存记游戏解说 宫廷版小游戏4399 关于仓鼠游戏下载 古代娃娃换装游戏 古代赵丽颖化妆游戏 宫廷版小游戏4399 故意谋杀3游戏 古代小朋友游戏介绍 刮裙子小游戏 ?m斗橙光游戏 ?m斗橙光游戏 古代做官小游戏 古装在线换装游戏大全 古典钢琴家游戏怎么玩 关于仓鼠游戏大全 关于电眼游戏大全 古代漫画打屁股的游戏大全视频 古代格格二游戏 古乐器合成游戏 古装在线换装游戏大全 古装穿搭小游戏下载 古代皇帝的游戏 关于仓鼠游戏下载 孤岛求生户外游戏 古代赵丽颖化妆游戏 古代漫画打屁股的游戏大全视频 古代皇帝的游戏 古代格格二游戏 古代漫画打屁股的游戏大全视频 关于仓鼠游戏大全 古装在线换装游戏大全 关于病人的闯关游戏 古典钢琴家游戏怎么玩 古代小朋友游戏介绍 关于仓鼠游戏大全 关于病人的闯关游戏 关于电眼游戏 古代赵丽颖化妆游戏 古装穿搭小游戏下载 关于步步惊心的游戏 骨头手术游戏视频教程 古代做官小游戏 关于电眼游戏大全 关于仓鼠游戏下载 古装在线换装游戏大全 宫廷版小游戏4399 关于步步惊心的游戏 古代赵丽颖化妆游戏 孤独的守望者游戏 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星游戏官网 异世界精苏系统:起家 Anonymous未名少女 绝武帝尊 东北神话 青年龙旭的烦恼 亚星游戏官网 万利官网 欧博游戏官网 亚星游戏官网 葡京官网 古代漫画打屁股的游戏大全 古装在线换装游戏大全 古装在线换装游戏大全 古代小朋友游戏介绍 古代小朋友游戏介绍 古代皇帝的游戏 古代漫画打屁股的游戏大全 古代做官手机版小游戏 古典钢琴家游戏怎么玩 关于仓鼠游戏大全 关于电眼游戏 古代格格二游戏 孤岛生存记游戏解说 宫廷版小游戏4399 古装在线换装游戏 古代漫画打屁股的游戏大全 刮裙子小游戏 古典钢琴家游戏怎么玩 古典钢琴家游戏怎么玩 古代娃娃换装游戏 古代小朋友游戏介绍 古代格格二游戏 古代漫画打屁股的游戏大全 宫廷妃子的游戏。 古代做官小游戏 关于步步惊心的游戏 孤独的守望者游戏 古代格格二游戏 孤岛求生户外游戏 关于电眼游戏大全