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
信用卡欠款是否能转至广发银行信用卡额度调平中信信用卡附加码是什么淘宝二手卖家怎么开通信用卡支付淘宝信用卡付款步骤信用卡欠款是否能转至捡到身份证办信用卡对方报案中信信用卡附加码是什么建行第二张信用卡如何还款支付宝信用卡付款手续费信用卡过了有效期还能还款最低吗信用卡欠款是否能转至可以网申的白金信用卡信用卡过了有效期还能还款最低吗中信信用卡附加码是什么支付宝信用卡付款手续费广发信用卡电话打完多久会有结果浙商银行信用卡不开卡浙商银行信用卡不开卡教师申请工行信用卡信用卡分期失败怎么办浙商银行信用卡不开卡建行第二张信用卡如何还款手机淘宝支持信用卡淘宝信用卡付款步骤教师申请农业银行信用卡淘宝二手卖家怎么开通信用卡支付有做过信用卡销售的吗 收入交行信用卡取现能分期吗可以网申的白金信用卡我,一个普普通通的初中学历的年轻人,很多人说我无所事事,年纪轻轻非要干出租车,但我不在乎,只是今天貌似有点点背?怪事频发?为什么呢?一个中国的黑帮老大,因为被某人暗算,被杀死了,一醒来就在韩国,却没想到自己到了韩国,还有两个孩子,一堆琐事堆积如山,各个势力也在韩国展开,是一个怎么样的故事发展呢,请等我慢慢道来。一场类似预谋已久的灾难突然悄无声息的降临 迅速扩散至蓝星的每个角落 引发了人类生死存亡的灭绝时 本在是星空世界武道至尊的叶陵在突破成神的最后关头 被一股神秘力量打断强行控制抹除 随便携带着一丝带着不甘的灵魂力跨越无数时空星海。 最后在魂力消耗殆尽之前 便将仅剩的灵魂力注入一名七八岁的少年体内。 无聊写着玩不时更新。琼花娇欲语,紫日浮云烟, 扶摇仙凌顶,执掌剑神霄! 一介女修如何踏步青云?剑道登极!吾剑沉仙!为保护女友而伤人的徐枫,入狱三年意外获得一身本领。 没想到出狱后,女友竟然要嫁给当年的仇人。 可怜这瞎眼的女人,本可一步登天,却选择坠入炼狱!一个传奇网游,一把剑,看一个游戏天才如何问鼎武道顶峰,成就一代枭雄,而命运之神又会如何安排呢?是懦弱还是其他?是废材蠢才还是其他?...男子:兄台,我观你面色红润,许是患有大病啊 “大夫,您怎知晓,我这见到您身上那白花花的银两着实是心痒难耐啊。” “您不觉得这像极了我前些日头丢落的吗?” “兄台言之有理” 男子看着那脖间的刀,想了想命重要。 在一片大陆上,一位神灵四处游荡,它走过之处都生出了无限生机。神灵的身上四散出灵,这些灵跟着神灵游荡,不同的旅程使灵不断变化,逐渐化为各种形态,形成了灵族和妖族… 一处灵在游历的时候不慎相互融合,亦为吞噬。吞噬后,幸存下来的灵成长速度异常加快,吞噬灵也渐渐痴迷上了这种成长方式。大量的吞噬灵不断吞噬,不断变化,逐渐形成了魔族、血族与鬼族。三族都需吞噬其它灵才能成长,若不愿再吞噬,轻则灵能枯竭,消逝加快;重则耗尽,在痛苦中死去…… 那位神灵总结了旅途中的所见所闻,被自然选择成为了自然之神。与此同时,它看见了人间的自然愈发恶劣,无奈无法干涉,它借梦的方式让部分人类来到了芸灵大陆,学习如何保护自然界的方法。芸灵大陆中的灵也感受到了人形的便利之处,渐渐都化为了人形。一些人在这里诞下子嗣,这些人类与灵或妖之子,集合组成了人族,而这一变化也被魔、血、鬼三族窥视着。在种种原因的促使下,第一次灵魔大战开始了……距离第二次“诸师之战”已经过去一千多年,人族死伤惨重,最终四分五裂,魔族回到了冥界,神族宣誓不再干涉下界杂事,在那之后,活下来的大部分人类跟随当代人皇住进了一座名为“宗师”的城池,随着时间的流逝,世界又恢复了以往的平静,可真的是这样吗?这个世界终究会发生改变,强者为尊的道理不会变,一人一矛,我们拭目以待。
万古魔尊 天武剑修 对不起小霞 半州风云 大宋奇人 未来中寻找过去 来自虚空的低语者 创世纪之责任篇 我与自己对弈 一枪定乾坤! 宅仙传说 异世手记 梦断大千世界 暗夜收割者 魂幕 最美神话 灵霄之下 紫圣封神传 布局百年徒弟请我出山! 幸运先生 浙商银行信用卡不开卡 广发银行信用卡额度调平 交行信用卡取现能分期吗 建行多张信用卡还款 淘宝信用卡付款步骤 信用卡过了有效期还能还款最低吗 教师申请工行信用卡 教师申请农业银行信用卡 信用卡支付办理 工作半年信用卡好办吗 信用卡欠款是否能转至 信用卡欠款是否能转至 网申的华夏银行信用卡怎么这么慢 广发银行信用卡额度调平 老师办信用卡 淘宝信用卡付款步骤 建行信用卡 安全码 教师申请农业银行信用卡 信用卡分期失败怎么办 信用卡欠款是否能转至 网申的华夏银行信用卡怎么这么慢 中信信用卡附加码是什么 广发银行信用卡额度调平 信用卡支付办理 工行信用卡关闭境外无卡支付 手机淘宝支持信用卡 教师申请农业银行信用卡 广发银行信用卡额度调平 信用卡分期失败怎么办 教师申请农业银行信用卡 浙商银行信用卡不开卡 网申的华夏银行信用卡怎么这么慢 淘宝二手卖家怎么开通信用卡支付 信用卡欠款是否能转至 手机淘宝支持信用卡 淘宝信用卡付款步骤 信用卡欠款可不可以转到别人名下 建行信用卡 安全码 手机淘宝支持信用卡 信用卡欠款可不可以转到别人名下 淘宝信用卡付款步骤 淘宝购物用信用卡快捷支付 教师申请工行信用卡 建行多张信用卡还款 信用卡支付办理 网申的华夏银行信用卡怎么这么慢 建行第二张信用卡如何还款 淘宝二手卖家怎么开通信用卡支付 交行信用卡取现能分期吗 捡到身份证办信用卡对方报案 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 莫斯肯漩涡 御临十方:十珏 小侦探高杰米 我史上最快飞升者 从鬼灭开始砍爆一切 澳门葡京游戏官网 葡京官网 AG真人 澳门葡京游戏官网 欧博游戏官网 捡到身份证办信用卡对方报案 淘宝怎么没有信用卡分期付款 手机淘宝支持信用卡 捡到身份证办信用卡对方报案 建行多张信用卡还款 有做过信用卡销售的吗 收入 建行第二张信用卡如何还款 广发信用卡电话打完多久会有结果 信用卡分期失败怎么办 信用卡过了有效期还能还款最低吗 广发信用卡电话打完多久会有结果 招行信用卡 礼品 信用卡支付办理 淘宝二手卖家怎么开通信用卡支付 信用卡过了有效期还能还款最低吗 广发信用卡电话打完多久会有结果 支付宝信用卡付款手续费 信用卡过了有效期还能还款最低吗 教师申请工行信用卡 网申的华夏银行信用卡怎么这么慢 淘宝购物用信用卡快捷支付 返利网还信用卡实名认证 可以网申的白金信用卡 支付宝信用卡付款手续费 捡到身份证办信用卡对方报案 中信信用卡附加码是什么 淘宝二手卖家怎么开通信用卡支付 信用卡欠款可不可以转到别人名下 建行信用卡 安全码 淘宝怎么没有信用卡分期付款