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
弥勒头像丰性感头像刷qq头像解说头像头像萝莉吧黑色头像狼带博的头像烦恼的头像三分钟头像头像男活泼俩孩子头像刷qq头像男微整头像吐舌男头像烦恼的头像头像男活泼面包店头像头像未来头像未来进宝头像日本头像男头像未来三分钟头像雪男头像女头像萝莉吧治愈女头像解说头像雪男头像女进宝头像男微整头像“待大地之上响起我们的呢喃,待高天之下回荡起我们的战歌,死去的将从坟墓中爬出,活着的将从天穹外归来。”   “修我三尺剑,震我通天鼓,奏我战时歌,沸我不灭魂,我以我之血,染尽九重天。”曾为前世顶尖杀手的姜扬,因为人的贪欲转生至异世界,将整个世界带到万劫不复之地,成为‘魔主’主角降生之日,被称为‘魔临之日’!修仙界大能陈苍玄在渡升仙劫之时被昔日仇家偷袭,导致穿越到只修武的大陆陈家的弃子陈枫身上,且看一个修仙者怎么在修武的世界一步一步走上顶端成为修武界的无上帝尊公元2077年,龙华一中的一名高三学生陈与年,在一次偶然的巧合下,接触到了往生乡与堕落王室,还知道在不久的将来,这个世界将会面临一次大洗牌,但是他明白 ,无论往生乡胜,或亦是堕落王室胜,人民还是处于苦难,都不是理想世界 ,所以,他和志同道合的朋友, 向外寻找, 传说中的“天&amp;quot;!究竟他能不能找到“天&amp;quot;!世界真的会被往生乡或者堕落王室所统治吗?理想世界又是什么样子的昵? 已经过去那么多天,他还是没有回来。 我与他不相见已二十年有余。 神经过敏,神经非常过敏。 …… 简介无力,尽是些嘈杂之作。 本书主角并不会秒天秒地秒空气,而是一个天赋平平的普通人, 一切还是要从,那场偶遇说起。 …… 大概是跟船流吧,前期有一个蜕变的过程。 练笔之作,望评论,多一些支持,让我知道自己的不足。“什么?原来我是恶魔?” 十六岁那天,‘穿越者’阎墨终于等来了属于自己的灿烂。 ------------------------------ ‘普通人类’加入恶魔学园学习成为恶魔的故事,大概会涉及入间同学入魔了,家庭教师,猎人。仙就浅修一下吧,搞笑我是认真的,少年背负血海深仇,只为让敌人买上保险写自己的名字,再手刃对手。游轮失事,一觉醒来发现自己身处荒岛之上,身边相伴的却是朝思暮想的豪门千金…… 荒岛之上,和女神一起打造我的世界!赵阳意外绑定可以往返现代与明末的传送门。 穿过传送门,对面是气势汹汹,向着他冲刺而来的八旗骑兵。 数次尝试都铩羽而归,赵阳直接上交传送门,与官方合作。 当官方看到赵阳展示的另一个世界后,整个大夏都为之轰动。 一个星球的资源,一个全新的未开发世界! 大夏官方第一时间下定决心,制定绝密计划,设置最高权限。 终于,再次踏入明末大地的赵阳。 身后,是一条蓄势待发的庞然巨龙……穿越洪荒百万年,还是玄仙修为   林长青绝望之际,师尊通天赐予九转金丹   没想到,竟然觉醒诸天赠送系统!   赠送九转金丹,返还百亿功德!   赠送通天剑符,返还神象镇狱劲!   赠送黄中李,返还混沌灵根!   赠送盘古精血,返还……   林长青行走洪荒,赠送无数宝物,杀妖,屠魔,救人族!   终于,当量劫降临之时,林长青一人横立量劫之前,挥手扫灭无边劫云!
星核之小兵狂想曲 星神女婿 其实我也不想穿越的 圣元魔尊 天炎:红尘如梦 从御灵开始 血弒帝霄 包子迷你世界 左手魔法右手修仙 穿越之荒唐人生 梦幻世界之崛起 还我天道! 青春与热爱 宇宙真神 游乐园:人在前面飞,魂在后面追 转生异界百兽岛之史莱姆篇 疯魔剑圣斩天下 末世最后一人的笔记 关照苍穹 白桦刻命 日本头像男 吐舌男头像 儿童头像. 解说头像 日本头像男 半格头像 带博的头像 美业头像 丰性感头像 男士污头像 很火的头像 面包店头像 洗手间头像 俩孩子头像 进宝头像 唐??头像 带博的头像 丰性感头像 三分钟头像 弥勒头像 吐舌男头像 黑色头像狼 青色的头像 头像萝莉吧 俩孩子头像 洗手间头像 丰性感头像 青色的头像 三分钟头像 丰性感头像 唐??头像 吐舌男头像 刷qq头像 弥勒头像 治愈女头像 唐??头像 刷qq头像 带博的头像 洗手间头像 刷qq头像 唐??头像 头像男活泼 萝卜小头像 面包店头像 头像萝莉吧 吐舌男头像 很火的头像 烦恼的头像 雪男头像女 男微整头像 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 渡尘,登仙 怖城 逃亡笔记之新世纪 血门关 签到十六年,我没想当皇帝 皇冠登3出租 亚星管理平台 澳门葡京游戏官网 皇冠登3出租 亚星官网 刷qq头像 日本头像男 头像未来 进宝头像 儿童头像. 儿童头像. 黑色头像狼 刷qq头像 雪男头像女 头像未来 烦恼的头像 特务头像 很火的头像 进宝头像 解说头像 面包店头像 黑色头像狼 青色的头像 进宝头像 萝卜小头像 男微整头像 男微整头像 黑色头像狼 黑色头像狼 雪男头像女 萝卜小头像 刷qq头像 解说头像 美业头像 三分钟头像