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情侣头像双人背影带字头像背影唯美霸气带字姐妹动漫头像一左一右2017微信头像狐媚女人情侣拥抱古风动漫头像一对搞笑欧美小孩头像图片大全女生头像糖果动漫可爱情侣头像一左一右动漫可爱情侣头像一左一右衬衫男动漫头像韩国分头像男生动漫可爱情侣头像一左一右古典照片情侣头像大全卡通粉红色系列头像女生头像女生头像女生什么动漫粉色头发图片女生头像欧美男生在海里的头像古风简约头像男生卡通粉红色系列头像女生头像女生头像女生衬衫男动漫头像姐妹动漫头像一左一右20172002年的某一天,陈雨后突然接到了一个任务,来自华夏官方的任务。他闭上了现世的眼睛,在来世睁开,是否能看透黑暗的迷雾,不在异域迷失自己? 他穿越到火山魔法学院,一个穷困潦倒,没有攻击技能的废物身上,无意间的一个举动,得到了一只智商很高,能跟人沟通的猎犬。 在它的帮助下,得到法宝恶魔心索,成为了各大势力竞相收买的红人。 俗话说的好,花无白日红,人无千日好,正当他即将步入人生巅峰的时候,意外出现了…… 十字路口,他将何去何从?少年被家族遗弃,遭受刺杀修为被废。 危难之际开启镇魂世界,神秘女子百般磨练,终修剑道。 自此修行坦荡,领悟无上剑道,修不灭剑体。 修武技,破苍穹,入圣域,掌握天下权,醉卧美人膝,翻手为云,覆手为雨, 轻挥手中剑,剑出移山镇海,诸天星辰陨落,横断八荒四野; 九洲雷霆动,剑气侵万古,临绝世剑神。天道不仁,以万物为刍狗! 天道殊不知,刍狗终究也会变为天狼, 我柴辰,生于人间,却在地府兴起。 我虽为鬼魂,却与佛结下了善缘。 作为人族最后的栖息之地——破碎世界。 天道若毁之,我必以手中剑,斩天上仙神!石庆猛,原名石猛。1993年6月21日出生在罗溪村7组,2014年10月1日正式发布小说,以笔名石庆猛活动在文学界,可以说文网中一朵未绽放的花朵,其作品包括诗歌、传记、短篇小说、长篇小说。一段七代传承中医人的故事,一首普通人的悲欢喜乐《生化危机》:楚枫一身雇佣兵装束,身处激光通道,一阵冷汗涔涔。 《陆小凤传奇》“急,在线等!我变成了西门吹雪,马上就要决战紫禁之巅了,怎么办?” 《风云》雄霸:楚枫这个家伙又来了,我当时害怕极了! 楚枫穿越到蓝海星,意外发现这个世界的轮回副本空间,都是他前世看过的电影动漫作品。 全世界只有他知道剧情,且他还比别人多了个选项——随机成为剧情人物!二十年前,一场大火,父母双亡,与妹妹分离。 二十年后,接到刺杀任务,在战斗过程中,猜测目标是和自己分开了二十多年的妹妹。 因为这个猜测,导致任务失败,受到组织惩罚,“意外”死亡。 重生后,在成长路上,发现了二十年前的那场大火里,还隐藏着不为人知的秘密……孙小圣穿越到西游世界,化身孙悟空。 不做取经工具人,发誓绝不闹天宫。 牛魔王:贤弟,我们打上天庭,平分三界。 孙小圣:你竟敢对天庭不敬,我同你恩断义绝! 系统:拒绝大闹天宫第一次,奖励混沌先天至宝【噬魂枪】! 玉帝:那个猴子怎么还不来闹天宫,西方来敦促三次了。 众神:陛下,那个孙悟空,已经成圣了!千万,别让他来了! 两年后,被军中战友称为“狂神屠灭者”传奇战神的特战兵王江晓如约归来,面对人事皆非的境况,该如何取舍,面对一步步浮出水面的暗黑真相,又该如何抉择! 世间的真爱该如何诠释,人间的正义又该如何解读。 孤儿江晓与独女简雯在一个城市读书,相恋四年,彼此深爱,毕业时江晓为追寻自己儿时便已植根内心深处的梦想做了一个让简雯无法理解也很难接受的决定,选择入伍。入伍临行前,两人定下两年之约。 两年后,成为特战兵王的江晓为两年之约离开了那片让他挥洒过无数血和汉承载着作为军人荣耀的火热军营。 回来后,却发现外面的世界已经不是自己认识的那个样子,简雯也变得如此陌生,所有的一切已人事皆非…… 不甘心的江晓不相信所看到的一切,化身“大侦探”的江晓随着调查的深入,一步步发现原来事情远没有自己想的那么简单…… 爱恨交织,黑白无道。 为守护爱和正义,江晓一步步走上了孤勇的战斗之路……
重生之大帝奶爸 宗门里除了我都是卧底 闲来无事小孩纸 大秦神魔传 关于无敌之后摆烂立宗这事 缩小人类:微缩纪元 盖世小仙医 痴神怒 道术高手的世外修行 理想国的破灭 轮回相杀 苏联之北 末世之每日一签算吉凶 人味 情书, 首富的光辉时光 全网狂黑,我逆流而上 八十锤 逆仙成魔传 鬼兵异传 微信男头像 阳光型 搞怪小孩高清头像 女生头像糖果 什么动漫粉色头发图片女生头像 手绘高冷图片头像女生背影 中长发女漫画头像 女生头像糖果 搞笑带字表情包头像 欧美男生在海里的头像 一半身头像 1电池头像图片大全 1电池头像图片大全 卡通粉红色系列头像女生头像女生头像女生 搞怪小孩高清头像 女生头像侧面盘腿 古风简约头像男生 qq头像动漫情侣头像一左一右头像2015款 微信男头像 阳光型 韩国分头像男生 头像背影唯美霸气带字 搞怪小孩高清头像 头像背影唯美霸气带字 韩国分头像男生 动漫可爱情侣头像一左一右 搞笑欧美小孩头像图片大全 二次元呆萌高冷头像情侣 微信男头像 阳光型 韩国分头像男生 韩国分头像男生 欧美男生在海里的头像 什么动漫粉色头发图片女生头像 qq情侣头像双人背影带字 卡通人物的照片女生头像图片 女生头像侧面盘腿 卡通粉红色系列头像女生头像女生头像女生 古风简约头像男生 卡通人物的照片女生头像图片 女生头像糖果 卡通粉红色系列头像女生头像女生头像女生 情侣拥抱古风动漫头像一对 古风简约头像男生 搞笑带字表情包头像 衬衫男动漫头像 qq头像动漫情侣头像一左一右头像2015款 微信头像狐媚女人 qq情侣头像双人背影带字 1电池头像图片大全 古风简约头像男生 二次元呆萌高冷头像情侣 头像男生字幕 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 我在异世界的修仙传 轮回情债 疯狂的禽兽 李毅破天 我不想谈恋爱! 万利官网 皇冠登3出租 百家乐官网 万利官网 欧博官网 qq情侣头像双人背影带字 搞笑带字表情包头像 1电池头像图片大全 搞笑带字表情包头像 搞怪小孩高清头像 姐妹动漫头像一左一右2017 女生头像侧面盘腿 卡通人物的照片女生头像图片 情侣拥抱古风动漫头像一对 女生头像糖果 一半身头像 女生头像糖果 中长发女漫画头像 卡通粉红色系列头像女生头像女生头像女生 qq头像动漫情侣头像一左一右头像2015款 qq情侣头像双人背影带字 卡通粉红色系列头像女生头像女生头像女生 女人与埃菲尔铁塔头像 女人与埃菲尔铁塔头像 手绘高冷图片头像女生背影 古典照片情侣头像大全 情侣拥抱古风动漫头像一对 搞笑带字表情包头像 姐妹动漫头像一左一右2017 一半身头像 古风简约头像男生 微信男头像 阳光型 二次元呆萌高冷头像情侣 什么动漫粉色头发图片女生头像 微信头像狐媚女人