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头像萌背影头像女生头像带字头像图片大全集没活了图片大全卡通人物古装情侣图片大全图片大全图片简单女生图片动漫图片大全可爱女生萌图片动漫图片大全老虎大便图片大全老虎大便图片大全九月带字图片大全简易的铅笔画漫画人物图片大全图片大全老虎大便图片大全小狗手绘素描图片卡通头像图片大全女生花海背影的图片大全小狗手绘素描图片卡通头像图片大全简单好看手绘漫画图片大全图片大全图片欣赏酷炫的猫头像动漫图片大全简单女生图片动漫图片大全开心樱桃小丸子图片大全九个文字图片大全何为末世?丧尸?魔怪?虫族?不!唯有当人类所恐惧的,所崇拜的,甚至是所幻想的一切都成为现实之时,才是人类真正的末日!灵气回涌,信仰重铸,这是神佛妖魔的饕餮盛宴,也是人类有史以来的最大浩劫!丧尸,异形,贞子,怪形,妖精鬼怪,神魔仙佛,这一切的一切,都将降临于世!这是真正的末日,这是末世……神魔纪元!——————这是不冷的第四本书,已完本三本共1500W字小说,无太监,人品保证,新书期急求支持!加更规则:打赏满100加更一章,鲜花满1000加更一章,加更的章节会在上架后爆发!大象老师给儿子、女儿写的系列书信,讲述自己在他们那个年龄时的故事。平凡的药童为了揭开自己身世之谜,踏上修真之路。玄灵界,这片拥有着十境九地的广袤大陆之上,每隔千年便会产生一次降灵异象,伴随异象应世之人被称为玄灵尊者,而每任玄灵尊者的使命,就是带领灵族众将,重新封印上古异族。大夏皇朝,文武并存。 妖魔鬼怪,无奇不有。 孙七天穿越而来,以逆天悟性文武双修,问鼎巅峰。 朝廷江湖中,皆是他的传说。 他是大夏棋圣,举手投足间,胜天半子! 也是大夏诗仙,绝世诗篇,信手拈来! 还是文道魁首,以创新之法,使文道昌盛! 诸多头衔之中,孙七天最为看重的,是大夏执剑人!   “吾孙七天,大夏执剑之人,以手中之剑,斩尽天下不公,开万世太平!”一场精心策划多年的入侵,摧毁了夏月一族最后的净土,为了复仇,也为了让族人活下去,夏月提前肩负起自己的责任。 没想到数年之后,夏月姐妹二人却发现了世界的秘密,在这个不断轮回的世界里,她们是唯一的变数。 我们,只想活下去!写手一个,喜欢随手写一些玄幻类型,如有指教请来。  李乘风穿越到一个妖魔横行的世界,成为青城山的一个守山人。   奈何他没有灵根无法修炼,只能安安分分做一个普通人。   但是有一天,他的系统突然变异了,从此成了一个令一众妖魔闻风丧胆的得道高人……   这妖怪也太弱了,我都没有出剑呢,怎么就死了。   我养的一条狗,居然是横扫妖界的一方妖王。   我池塘里的乌龟,竟然蜕变成了洪荒神兽。   之前跟我下棋的老头子,最后竟然成仙了。   还有那个最喜欢听他吟诗作对的漂亮姐姐居然修仙界第?仙?。   知道这些真相之后,李乘风开始怀疑人生:   我该不会真成为绝世高手了吧? 不知过了多少年,换了多少身份,每此醒来都会变成了婴儿,神魂封存记忆,一代神者,又从新开启一生,待28岁生日那年,记忆开启,逆天强者强势回归,其家族富可敌国,协助国家抵御外敌,不料家族出现变故,这一世,被家族族长安排在了偏远山区的一户人家,看顶级神尊如何纵横天下。我本无意争锋,却被迫推上高位,在血与火中,一步步走到天的举世瞩目的高度,那么就剩下天了......来自他的故事传奇。
我于当世立绝资 乱世奇谈之烽火枭雄 伪神与混沌末日 凌神大陆 逍遥大地主 开局爆亏,反买垃圾股涨停 回忆中的从前 王者梦庄周 崩坏的诸天 滚滚红颜 美漫之绝对掌控 传承之泪 幕府医师 一切从新婚夜开始 郭嗷嗷脑洞随记 御灵师:天缺之人的逆袭 金庸世界里的至尊无赖 精灵从上古进入全世界 天纪:靖帝本纪 超喜欢女装 男生摸脸女生的脸图片大全 简单猫咪卡通图片大全可爱 可爱女生萌图片动漫图片大全 卡通有个性的女孩图片头像女生图片大全 男生摸脸女生的脸图片大全 结婚卡通图案大全图片大全 可爱女生萌图片动漫图片大全 简单手绘q版男生头像图片大全可爱图片大全图片大全 简约少女头像唯美图片大全 开心樱桃小丸子图片大全 酷炫的猫头像动漫图片大全 酷炫的猫头像动漫图片大全 九个文字图片大全 简单猫咪卡通图片大全可爱 军人天使动态图片大全图片大全图片大全图片大全 卡通有个性的女孩图片头像女生图片大全 可爱又美丽的漫画图片大全 简约少女头像唯美图片大全 简易头像大全图片大全图片 女士近视镜图片大全 简单猫咪卡通图片大全可爱 卡通人物古装情侣图片大全图片大全图片 男生动漫图片背影图片大全 没活了图片大全 简单女生图片动漫图片大全 九个文字图片大全 简约少女头像唯美图片大全 男生动漫图片背影图片大全 简易头像大全图片大全图片 简约少女头像唯美图片大全 卡通有个性的女孩图片头像女生图片大全 简单好看手绘漫画图片大全图片大全图片欣赏 卡通娃娃男女图片大全 军人天使动态图片大全图片大全图片大全图片大全 女生花海背影的图片大全 卡通有个性的女孩图片头像女生图片大全 卡通娃娃男女图片大全 可爱女生萌图片动漫图片大全 九个文字图片大全 卡通人物古装情侣图片大全图片大全图片 漂亮气质美女头像图片大全 开心樱桃小丸子图片大全 女生头像黑白霸气图片大全 可爱又美丽的漫画图片大全 没活了图片大全 简单猫咪卡通图片大全可爱 酷炫的猫头像动漫图片大全 漂亮气质美女头像图片大全 九个文字图片大全 可爱卡通杯子图片大全 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 貔子窝傩侠 仙界凡间 长安斩妖录 世上只有我一个人类吗 棺山盗墓贼 百度 百度 百度 百度 百度 可爱卡通杯子图片大全 漂亮气质美女头像图片大全 可爱女生萌图片动漫图片大全 简约少女头像唯美图片大全 酷炫的猫头像动漫图片大全 简单好看手绘漫画图片大全图片大全图片欣赏 男生动漫图片背影图片大全 简单猫咪卡通图片大全可爱 qq头像萌背影头像女生头像带字头像图片大全集 简易的铅笔画漫画人物图片大全图片大全 qq头像萌背影头像女生头像带字头像图片大全集 卡通娃娃男女图片大全 可爱卡通杯子图片大全 卡通人物古装情侣图片大全图片大全图片 九个文字图片大全 漂亮气质美女头像图片大全 酷炫的猫头像动漫图片大全 可爱又美丽的漫画图片大全 女生头像黑白霸气图片大全 简单好看手绘漫画图片大全图片大全图片欣赏 女士近视镜图片大全 女生头像黑白霸气图片大全 qq头像萌背影头像女生头像带字头像图片大全集 女士近视镜图片大全 漂亮气质美女头像图片大全 简单手绘q版男生头像图片大全可爱图片大全图片大全 漂亮气质美女头像图片大全 简约少女头像唯美图片大全 老虎大便图片大全 男生摸脸女生的脸图片大全 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网