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
95588短信信用卡额度把钱存进信用卡安全吗办了广发信用卡没激活办理香港招行信用卡办车主信用卡加油卡95588短信信用卡额度白金悠信用卡上限多少办了广发信用卡没激活白户信用卡好下吗办工行高额信用卡吗办房贷可以送信用卡吗办了广发信用卡没激活百度有钱花办信用卡办房贷可以送信用卡吗办了广发信用卡没激活吗办工行高额信用卡吗白金信用卡卡号统一吗办房贷后多久办信用卡办房贷后多久办信用卡澳元信用卡 有哪些银行白户难批信用卡办房贷后多久办信用卡白户信用卡好下吗百度钱包信用卡100白条组合招商信用卡芭比美丽信用卡竖版 金白条组合招商信用卡百度钱包信用卡100澳元信用卡 有哪些银行百度有钱花办信用卡回到古代,成为一个小小的家丁,楚尘开始了自己的逆袭之路。 啥?被人当做童养夫,媳妇还不待见? 无妨,无妨,第一才女还在痴心等候呢,要不然考虑给一次机会? 啊?番国国师还要来登门辩经? 不怕,不怕,丢给一本《西游记》让他参悟,没准就能白日飞升了。 咦?燕国女帝又来密信要讨论人生哲理? 何必,何必,陛下要不我们还是躺下聊吧。 一剑转身三千里,一言可退百万师。 哥虽然不在江湖,但江湖上处处都有哥的传说。 我楚尘来了,就注定要名震天下!赵风穿越秦朝成为了始皇帝的第七子,嬴子歌! 原以为远离咸阳便能躲避灾祸,但赵高却找上门,好在系统如愿开启。 【神选一:接受始皇召令,卸下兵权,立即启程返回咸阳。】 【神选二:拒接始皇召令,立刻起兵,自立为王!】 【神选三:接受始皇召令,立刻回都,向始皇索要太子位!】 面对选择,嬴子歌选择了去向嬴政要太子之位。 至此,暴揍胡亥、疯斩徐福、莽破匈奴、凶伏百越..... 蒙恬:报始皇帝陛下,太子殿下率兵诛杀了匈奴二十万。 嬴政:...... 章邯:报始皇帝陛下,太子殿下已经诛杀了六国叛徒,这是刘邦与项羽的人头。 嬴政:...... 神创造了世界,于是有了万物,后创造了万物之灵,人。 不知从何时起,神明消失,大地出现鬼怪的身影,以人为食,且没有天敌的鬼自此势力日渐壮大,自此世间魔影纵横,怨灵交错,生灵涂炭。 在与鬼怪的战斗中,他们的体内拥有神创造人时留下的一丝神性,借此窥得天机,修得包罗万象的魂和神秘莫测的咒语,驱邪除魔、斩妖灭怪,他们自称阴阳师。 此后,鬼怪回到鬼界,阴阳师居于阴阳界,世界的秩序得以平衡。 千年后,阴阳界现任四位府主反叛,夺走可以压制鬼怪力量的《百鬼夜行》。为了拿回这本书,阴阳师踏上鬼界…… 李乐明是个技术宅,有一天,丧尸病毒入侵,寄生虫紧跟其后,天气变化无常,自然灾害频繁给事情雪上加霜,为了活命,技术宅李乐明自制系统和武器对抗逆境。 (本书为短编科幻故事,主打未来科技,是爽文,无敌文,由于一章章节字数较小强烈建议存起来达到一定字数再看!)“每当看见奥特曼小视频的时候,下面总会有一堆品论,你,相信光吗?我也会笑嘻嘻的在下面评论我信啊!” “只是,我相信的光,是那些我不知道姓名的人散发的光芒。” “我相信的不是光,是那些燃烧自己散发光辉的人啊!”苍穹世界群雄并起天才如云其主大陆圣灵大陆更是天才多如狗但是圣灵大陆一直被天道统治者,并且这里的天道是邪恶的,圣灵大陆的生灵在天道和天道家族的统治下苦不堪言,并且每过一段时间天道还会将手伸入别的大陆和小世界,给那些地方带入黑暗每当这时总有英雄挺身而出但是这些英雄在和天道一战后再也没有回来过........四象纪元1000年天道卷土重来,且看这一代的四位英雄结局如何叶云运气爆棚意外得到一个高纬度制造的次元面板, 并且利用面板走上了穿越诸天万界......我是一个老千,为了报仇,我坐上赌桌,以千术把仇人踢进赌博的深渊。老千生涯,靠赌为生。三教九流,江湖百态。 赌桌上,没有常胜将军,输一次,万劫不复。世上最难的不是苦,世上最难的是情。 你可渡天下有情人,而你却渡不过自己的情。 难道唯有无情方为大道 如果你是他你是选无情入有情,还是由有情变无情! 这是七情六欲之间的战斗! 这是初心与本性的争夺!我本无意争锋,却被迫推上高位,在血与火中,一步步走到天的举世瞩目的高度,那么就剩下天了......来自他的故事传奇。
英雄联盟之十年信仰 星神战天记 荒芜古墓 平平淡淡的我重生啦 怨种太子江湖事 迪诺奥特曼 阴阳刺青 剑荡人生 重返1982开启暴富人生 诡异调查录 地球坠落 仙恒录 新十日谈 网王之世界之巅 木头枕头 梦之归程 剑战诸天 分身大帝 汝窑瓷盘传奇 巍巍高楼起 芭比美丽信用卡竖版额度 办工行高额信用卡 白金信用卡卡号统一吗 办车主信用卡加油卡 芭比美丽信用卡竖版额度 百度钱包申请信用卡100 白金信用卡卡号统一吗 百度信用卡 返现100 芭比美丽信用卡竖版 金 百度信用卡 返现1000 白金信用卡 白金储蓄卡 白金信用卡 白金储蓄卡 百度钱包信用卡1000 办工行高额信用卡 95588短信信用卡额度 办车主信用卡加油卡 白金信用卡卡号 芭比美丽信用卡竖版 金 白户办工商信用卡 办了广发信用卡没激活 办工行高额信用卡 办了广发信用卡没激活吗 把钱存进信用卡安全吗 办房贷可以送信用卡吗 办工行高额信用卡吗 百度钱包信用卡1000 芭比美丽信用卡竖版 金 把钱存进信用卡安全吗 白户办工商信用卡 芭比美丽信用卡竖版 金 办车主信用卡加油卡 办个人营业执照在哪办理信用卡 办理香港招行信用卡 95588短信信用卡额度 百度钱包信用卡100 办车主信用卡加油卡 办理香港招行信用卡 白金信用卡卡号统一吗 百度钱包信用卡1000 办了广发信用卡没激活吗 白条组合招商信用卡 百度信用卡 返现1000 95588 办理信用卡短信 白金信用卡卡号 办房贷可以送信用卡吗 办个人营业执照在哪办理信用卡 白金信用卡 白金储蓄卡 白条组合招商信用卡 百度钱包信用卡1000 白金悠信用卡上限多少 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 莲生谣 洛洛历险记之最终对决 萧阳 大梁镇妖司 九魂乱世 百度 百度 百度 百度 百度 办工行高额信用卡吗 办工行高额信用卡吗 办车主信用卡加油卡 办车主信用卡加油卡 办了广发信用卡没激活 办了广发信用卡没激活吗 95588 办理信用卡短信 办工行高额信用卡 白金悠信用卡上限多少钱 百度钱包申请信用卡100 95588短信信用卡额度 白户难批信用卡 百度钱包信用卡100 白金信用卡卡号 办了广发信用卡没激活吗 芭比美丽信用卡竖版额度 办工行高额信用卡 办工行高额信用卡 百度钱包信用卡100 百度钱包信用卡1000 把钱存进信用卡安全吗 办了广发信用卡没激活 澳元信用卡 有哪些银行 办个人营业执照在哪办理信用卡 办车主信用卡加油卡 芭比美丽信用卡竖版 金 95588短信信用卡额度 百度信用卡 返现100 百度钱包信用卡100 办个人营业执照在哪办理信用卡 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网