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
狗狗胰腺炎用什么药狗狗养在家里那个位置狗狗胰腺炎治疗与恢复狗狗易得的传染病狗狗疫苗后得犬瘟细小吗狗狗胰腺炎用什么药狗狗有细菌会传染吗狗狗胰腺炎治疗与恢复狗狗眼里的世界文章狗狗有很多皮狗狗用试纸的细小误诊狗狗胰腺炎用什么药狗狗有时尿外面狗狗用试纸的细小误诊狗狗胰腺炎治疗与恢复狗狗有很多皮狗狗有抑郁症怎么办狗狗应该经常换狗粮嘛狗狗应该经常换狗粮嘛狗狗胰腺炎好转的表现狗狗养在家里臭怎么办狗狗应该经常换狗粮嘛狗狗眼眶发红什么原因狗狗一直干咀嚼狗狗疫苗后得犬瘟细小吗狗狗养在杂房里合适吗狗狗易得的传染病狗狗一般几点生宝宝狗狗胰腺炎好治疗吗狗狗有时尿外面作为人,我们的一生已经告终。或许带着些许的遗憾与不甘。 但,故事远没有结束。 遗忘在历史深处的计划再度重启,我们也终于踏上了从未想象过的高度。不再为人的我们,正逐渐登上神的宝座。 此世已无可避免地堕入深渊,而人生已经结束的我们,无能为力。唯有磨砺自己的力量与意志,在漫长的时光中感悟,才能在彼岸的智慧中找到拯救此世的途径。 神,从不是特权的象征。在我们眼中,那是终将背负起的责任。他们这些人,为了一生的热爱,在赛场中对决。这条路没有腥风血雨,却注定荆棘丛生,只有满腔热血,挥洒战场,战至终章。 他们就是,不朽的丰碑! “你相信光吗?” 荣耀启程,再出发,这消逝的荣耀,终将归来。顾八方携带《武学加点系统》穿越异界,本以为是低武世界,谁知竟然遇到了邪灵妖魔。 面对武者完全无法对付的邪灵,顾八方丝毫不慌,他开启武学加点提升,无限变强之路。 四十年功力! 八十年功力! 一百二十年功力! 当顾八方横推一切,拳裂天地,脚踏苍穹之时,高高在上的至尊们才彻底惊醒。 大乾人皇:谁言邪灵不可灭,八方一出天地清! 浩然宗主:顾八方,天下第一奇才,我愿称他为武道最强。 岳麓院长:见过顾八方,我才知道什么叫勇、悍、莽! 邪灵宗主:我和顾八方,到底谁才是最大反派啊?灵界中突然出现了不寻常的危机,这让灵界第一人林钧不知如何解决,而灵界之外,无数强者纷纷越界,想踏平灵界。 林钧苦守无果,最终无奈之下,他做出大胆决定,剥离人性,只身前往灵界之外,寻找问题根源,而分离出的人性,将会修炼灵界之中最强神法,重回大陆之巅,寻找救世之法。1”娘子,就是他欺负我!你揍他“说完这句话的白许,不由的想起几年前的那一切的开端,当时白许作为一名普通的小贩只想过平凡的生活,然而在一个风和日丽的下午,一天一群高大威猛的士兵突然过来掀了他的摊子,并把他绑走说要他成为公主的丈夫? 顾星辰,云锦山有史以来最年轻的天师,通阴阳明医术,占卜看相无所不能。五年期满,返回云镇,自此一代天师之名不胫而走。 风水堪舆,易如反掌;不治之症,一针救魂;牛鬼蛇神,一剑平之。 小小云镇,很快就成了首富大佬挤破头都想瞻仰的神圣之地。小小天师,畅游都市,只手定乾坤!从蓝星穿越而来的孤儿夜无明,没有朋友,没有父母,记忆之中更不知自己从何而来,为什么会来到这里……让我们一起来看看少年如何恢复自己的记忆,解开自己的身世之谜。还没想好一次意外的穿越,改变了原本的历史进程,唤醒了北宋之魂,拿起了北宋之兵,灭了北宋之敌!
监管之外 女派修仙,师傅您轻点打 了不起的修真界 时空行者之死亡烈风 一指奇仙缘 异世魔改成神路 在古代当反派 封澜传 小岛:螳螂效应 杀手的小可爱 核爆持铲青年 真实修行 九幽剑帝 渡死 我的世界之史蒂夫无敌了 大齐极品王爷 罪恶行为 蓝星主宰者 强悍且正义的刀修 斗数之主 狗狗养在哪里 狗狗用围栏还是笼子好 狗狗有抑郁症怎么办 狗狗应该经常换狗粮嘛 狗狗养在哪里 狗狗痒痒会发怒 狗狗有只眼睛进灰睁不开怎么办 狗狗有哪些突发性疾病 狗狗养在杂房里合适吗 狗狗有时尿外面 狗狗眼眶发红什么原因 狗狗眼眶发红什么原因 狗狗一直干咀嚼 狗狗有很多皮 狗狗胰腺炎引起肾脏 狗狗疫苗后得犬瘟细小吗 狗狗有只眼睛进灰睁不开怎么办 狗狗养在杂房里合适吗 狗狗养在家里臭怎么办 狗狗胰腺炎用什么药 狗狗用围栏还是笼子好 狗狗胰腺炎治疗与恢复 狗狗养在家里那个位置 狗狗用什么止疼最有效 狗狗有哪些突发性疾病 狗狗一直干咀嚼 狗狗养在杂房里合适吗 狗狗养在家里那个位置 狗狗养在家里臭怎么办 狗狗养在杂房里合适吗 狗狗应该经常换狗粮嘛 狗狗用围栏还是笼子好 狗狗易得的传染病 狗狗胰腺炎用什么药 狗狗一直干咀嚼 狗狗疫苗后得犬瘟细小吗 狗狗胰腺炎自行治疗 狗狗有只眼睛进灰睁不开怎么办 狗狗一直干咀嚼 狗狗胰腺炎自行治疗 狗狗疫苗后得犬瘟细小吗 狗狗有什么急性病 狗狗胰腺炎好转的表现 狗狗与老人感人故事 狗狗用什么止疼最有效 狗狗用围栏还是笼子好 狗狗眼眶发红什么原因 狗狗易得的传染病 狗狗胰腺炎好治疗吗 狗狗有细菌会传染吗 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 玄傲传 泰拉瑞亚:万年之后 风武魔天 蛟龙问道 虫族入侵,我誓死守护人族 亚星官网 欧博游戏官网 欧博官网 亚星官网 AG真人 狗狗用围栏还是笼子好 狗狗胰腺炎用什么药 狗狗眼眶发红什么原因 狗狗养在哪里 狗狗有很多皮 狗狗胰腺炎自行治疗 狗狗胰腺炎治疗与恢复 狗狗有细菌会传染吗 狗狗胰腺炎自行治疗 狗狗应该经常换狗粮嘛 狗狗有五个爪 狗狗用什么止疼最有效 狗狗一般几点生宝宝 狗狗用围栏还是笼子好 狗狗与老人感人故事 狗狗眼里的世界文章 狗狗眼眶发红什么原因 狗狗有哪些突发性疾病 狗狗胰腺炎引起肾脏 狗狗有什么急性病 狗狗眼里的世界文章 狗狗有五个爪 狗狗有什么急性病 狗狗痒痒会发怒 狗狗有时尿外面 狗狗有抑郁症怎么办 狗狗养在杂房里合适吗 狗狗有只眼睛进灰睁不开怎么办 狗狗应该经常换狗粮嘛 狗狗眼眶发红什么原因