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
很老的吸血鬼的电影半暹降电影泰国电影一个红色棺木恐怖色情僵尸电影大全僵尸捉鬼42集电影很老的吸血鬼的电影股票电影 西瓜影音泰国电影一个红色棺木13猛鬼在线观看 电影最新热映电影大鸿米店电影完整版在线观看很老的吸血鬼的电影上帝视角的电影类似鬼眼刑警的电影泰国电影一个红色棺木最新热映电影猛鬼上身电影末路狂澜相似的电影末路狂澜相似的电影吸血鬼吃吸血鬼的电影电影 两个男人滑雪末路狂澜相似的电影13猛鬼在线观看 电影僵尸王子电影僵尸捉鬼42集电影城堡 电影恐怖色情僵尸电影大全鬼媾人电影院近年来的吸血鬼和狼人的电影上帝视角的电影林凡作为一个标准的95后社畜,因丧尸危机爆发,异能觉醒,且看他在人性丑恶,丧尸横行的末日世界如何躺平。被迫害的李只能带着一对B去打NBA, 本来只想混两年就买只球队当老板, 没想到阴差阳错, 居然混到了总冠军。舔狗何凡被无情分手, 揍人不成反被揍, 叮,检测到有效血液成分,最强鬼王系统开始苏醒。 捉鬼致富,舍我其谁。 情敌变弟子,女鬼做丫头。 走上人生巅峰 一款与现实百分之九十九真实的虚拟游戏神秘发布 却随着玩家不断进入游戏后 彻底露出来獠牙。无聊写写哈哈哈!异宝降世,引修行者争夺,陆丰年幸得一灵瞳,从此可观天地灵气流向,探器灵记忆,获无数功法神通。 “哼哼,我的命运只于手中剑,何人胆敢说半分。” 他不相信仙人救世,但是他相信自己。若行事有违天道,那么便凌驾于仙魔之上,与天论道。林峰因为一场意外竟然落得丹田受损,差点身死人亡,但最后竟然获得无大机遇,随后一路顺风,走上至尊巅峰。天才与天才之间的较量! 从小就有着惊人力量的人类,一开始便已经是普通人类的顶尖。头脑,背景,皆是最顶尖之流。 死去最爱的人,化为世界上最大的恶魔? 天才与天才之间的脑力对抗。 即将复活的最终怪物? 军阀割据的硝烟拉开血色幕帘,震颤的华夏撕心裂肺,真理萌芽崛起,热血青年何以报国? 他们血肉之躯先行,为民生而立志,为真理而捐躯,为华夏之崛起而浴血奋战。 苏家二少幸遇刁五爷,改写了病怏怏的一生,幸遇李美英,热血青年找到真理的最终方向,与日寇拼死搏杀,用血肉筑起华夏尊严,然而在国内战争伊始,面对同胞之间的刀兵相见,他茫然失去了方向,何以为家?何以卫家?何以同袍? 北平在风雨中飘摇, 封建贵族、帮会、特务处处设立陷阱,为和平解放北平的地下党将面临怎样的艰难险阻? 在迎来解放军入城的那一刻,正阳门的城楼上,他头悬绞刑架,她刀架虎头铡,红日冉冉升起,是血祭?还是新生? 李佑前世是京都大学历史系高材生,一朝穿越,别的穿越者什么金手指都有,唯独他带了个摆烂系统。好不容易靠自己努力开了家酒楼,这天三个中年男子来到酒楼,为首的自称老李,从此之后一切都变了,李佑说出任何决策,没多久就会被执行。不久后的某一天,老李说道:“其实我是你爹!”李佑心中一万只草泥马跑过,我帮你那么多,你居然想当我爹!!!熟读三国的刘宏突然穿越到了东汉末年早死的一个皇帝身上!算算还有五年就要死!刘宏决定!逆转乾坤!
玄幻:这个炉鼎太逆天 从一块伯爵领开始 重开,并且可以存档 云门弃少 胭脂河 规则碎片 凌晨电台 一个异世界铁匠的传奇 众神偏爱我们兄妹 残阳起风雷 百缘 诸天神魔系统 元素方舟 哇噻,我成了非洲马赛人! 逆天改命后我封神了 重回到16岁的灿烂人生 一醉平生 开局和女神流落荒岛 从变天崛起 剑镇万界 电影 两个男人滑雪 大鸿米店电影完整版在线观看 于捉鬼仔有关鬼片电影 恐怖色情僵尸电影大全 电影 两个男人滑雪 美国滑板电影有那哪些 股票电影 西瓜影音 2014年二月电影 半暹降电影 妻子误杀丈夫美国电影 国外鬼怪日女人的电影 国外鬼怪日女人的电影 电影棺木心理 大鸿米店电影完整版在线观看 近年来的吸血鬼和狼人的电影 电影泰国枪杀 猛鬼上身电影 半暹降电影 棺材降电影56 吸血鬼吃吸血鬼的电影 类似鬼眼刑警的电影 钟发主演的捉僵尸电影 棺材降电影56 僵尸捉鬼42集电影 2014年二月电影 电影棺木心理 半暹降电影 棺材降电影56 13猛鬼在线观看 电影 半暹降电影 恐怖色情僵尸电影大全 类似鬼眼刑警的电影 泰国电影一个红色棺木 吸血鬼吃吸血鬼的电影 电影棺木心理 电影泰国枪杀 很老的吸血鬼的电影 股票电影 西瓜影音 电影棺木心理 很老的吸血鬼的电影 电影泰国枪杀 最新热映电影 僵尸王子电影 猛鬼上身电影 末路狂澜相似的电影 类似鬼眼刑警的电影 国外鬼怪日女人的电影 恐怖色情僵尸电影大全 近年来的吸血鬼和狼人的电影 股票电影 西瓜影音 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 开局捡到宇宙登陆器 九劫真神齐飞鸿 科技梦境 岁月元尊 瞎子剑仙,蜀山观像三百年 欧博官网 亚星官网 万利游戏官网 欧博官网 澳门葡京游戏官网 鬼媾人电影院 很老的吸血鬼的电影 一个警察被另一个警察背叛之后变成幽灵警察的电影 棺材降电影56 13猛鬼在线观看 电影 电影泰国枪杀 钟发主演的捉僵尸电影 恐怖色情僵尸电影大全 类似于冰雪奇缘的英文电影 于捉鬼仔有关鬼片电影 恐怖色情僵尸电影大全 电影棺木心理 上帝视角的电影 猛鬼上身电影 猛鬼上身电影 2014年二月电影 末路狂澜相似的电影 13猛鬼在线观看 电影 近年来的吸血鬼和狼人的电影 很老的吸血鬼的电影 吸血鬼吃吸血鬼的电影 半暹降电影 最新热映电影 于捉鬼仔有关鬼片电影 美国滑板电影有那哪些 城堡 电影 半暹降电影 末路狂澜相似的电影 城堡 电影 僵尸王子电影