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头像不能动态图片个性头像性感女男生大笑动漫头像简单手绘头像短发女生头像励志图片适合做头像的笑头像女生欧美笑头像女生欧美特别伤心特别伤心的网名女生头像女生头像人物头像图片男 帅气笑头像女生欧美帅气小男生头像动漫黑白卡通意境头像女生彼岸花头像代表什么用吉祥如意可作头像吗简约的女生手绘头像唯美qq头像情侣个性网一左一右黄昏色头像男qq头像不能动态图片“pa!!!”北斗你是否清醒!!!山中怒拍桌子;艾斯,你个衰仔!!!给我起来把怪兽cao翻!!!圣诞老人指兽示意…当一切的一切变得暴躁起来,重生后的北川也应如是。 (小众文学只是想写一个自己幻想的奥特世界,随缘更新,第一次写文)云起龙骧,化为侯王。 华夏龙隐特种大队指挥官云尘意外魂穿平行时空,成了北赵逍遥侯嫡子云尘。 本想寻一处山水,结草庐一间,忙时种田,闲时钓鱼,如此,一生。 奈何逍遥侯云擎阵前重伤坠马不知所踪,一时间朝堂诡谲,暗流涌动,江湖动荡,风起云涌。 一脚踏入上京棋局的云尘,真的只是一枚棋子吗? 且看纨绔世子如何搅动九州风云! 云尘:本世子力保皇子赵政继承帝位,谁赞成?谁反对?! 西秦:亡我国朝者,无耻之徒云尘也! 南齐:瑟瑟发抖+1 东吴:瑟瑟发抖+2 胡虏:瑟瑟发抖+10086 江湖:……他是弃婴他是小保安他只有二百块。他用神鬼莫测的医术活人无数,他凭一身武功历经凶险,他最终得成伟业名利双收。穿越到了火影世界,穿越成为未被灭族的漩涡一族的族人,好在作为穿越者他也拥有必备的金手指系统,能够复制万能系统,我看一眼你这个禁术不错拿来吧,你这个血继限界不错拿来吧,你强任你强,系统最猖狂。他,长生王者,为了却心愿,乘兴而归,甘愿伴她左右,护她周全。 为她,逆了天下,只为一言之诺,蓦然回首,踏血而歌! 为她,亡了诸国,只为一怒红颜,腥风血雨,血染皇城!大宇宙会囊括非常非常多的元素,而这本书,三界之战只是其中的一部分元素。 既然叫三界之战,那就是天地人三界之间的战争。如果你喜欢,那就请多多收藏吧。我一定会尽力将这本书写好,做到不断更的情况。玄元大帝斗兽失败,列国入侵,判乱四起,群雄逐鹿,看国仇家狠,儿女情长,英雄热血,何去何从.....退役武警李北狐意外坠入一个与现世并存的江湖世界,这个世界因为他的闯入,打破了几十年的和平,一时间纷争皆因他而起,各方人马明争暗斗,而他最后发现,原来自己早就成为一个巨大阴谋下的棋子......霸王再次醒来时,眼前是一片夕阳,乱军厮杀的声音犹然在耳…… 高粱河,一个对于宋人来说久久不能平复的地方,手中的霸王枪熠熠生辉,这一次,好好来! 公元979年,项羽于高粱河大破辽国,收复燕云。 而后,展开了他征伐天下的宏梦。 攻西夏、破大理、复西域、征东瀛。 拜占庭、阿拉伯、还有你什么神圣罗马帝国帝国 也得倒在我拔山扛鼎的气势之下! 亚欧大陆尽在掌握! 虞姬,你看到了吗?你的男人,成为了这世界之王!人在异界,冕冠一哥。
潮起之时 亲情暴力 师傅的罗曼史 暗星孤影 最是寂寞逍遥仙 六界穿梭 念凡纪元 未来之无尽星穹 司令前传 探案前和清冷影后契约结婚 两个欢喜冤家 万古雷体 魔装Detent 星际扫地机器人 云星揽约 超品 末日世界的蔷薇 我在菜市口斩妖除魔那些年 窃玉奇缘 未来战警 不存在的战争 图中有块石头像仙鹤 闺蜜头像两张一对卡通 励志图片适合做头像的 笑头像女生欧美 图中有块石头像仙鹤 qq头像男生非主流霸气帅气 很漂亮很可爱的头像 阳光男笑头像 用吉祥如意可作头像吗 qq头像不能动态图片 帅气小男生头像动漫 好看头发女生头像 黑白卡通意境头像女生 简单手绘头像短发女生头像 动画大耳朵图图的图片头像情侣 彼岸花头像代表什么 很漂亮很可爱的头像 用吉祥如意可作头像吗 人物头像图片男 帅气 动漫男同头像吧 闺蜜头像两张一对卡通 男生大笑动漫头像 中年人头像照片作业 个性头像性感女 简单手绘头像短发女生头像 黑白卡通意境头像女生 用吉祥如意可作头像吗 中年人头像照片作业 人物头像图片男 帅气 用吉祥如意可作头像吗 彼岸花头像代表什么 闺蜜头像两张一对卡通 简约的女生手绘头像唯美 动漫男同头像吧 qq头像情侣个性网一左一右 彼岸花头像代表什么 qq清新动漫女生头像2015最新版 很漂亮很可爱的头像 黑白卡通意境头像女生 qq清新动漫女生头像2015最新版 彼岸花头像代表什么 最新头像2018 特别伤心特别伤心的网名女生头像女生头像 好看头发女生头像 个性头像性感女 闺蜜头像两张一对卡通 帅气小男生头像动漫 简约的女生手绘头像唯美 黄昏色头像男 男神个性头像 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 仙人众 也曾江湖 夜灵纪元之神魔学院 逃亡笔记之新世纪 秋与秋月 万利游戏官网 欧博游戏官网 欧博官网 万利游戏官网 AG真人 好看的qq头像动态图片下载 qq头像情侣个性网一左一右 简单手绘头像短发女生头像 动漫男同头像吧 励志图片适合做头像的 个性头像性感女 图中有块石头像仙鹤 图中有块石头像仙鹤 简单手绘头像短发女生头像 阳光男笑头像 笑头像女生欧美 男神个性头像 最新头像2018 中年人头像照片作业 帅气小男生头像动漫 动画大耳朵图图的图片头像情侣 好看的qq头像动态图片下载 qq头像男生非主流霸气帅气 男生大笑动漫头像 中年人头像照片作业 个性头像性感女 特别伤心特别伤心的网名女生头像女生头像 图中有块石头像仙鹤 好看的qq头像动态图片下载 闺蜜头像两张一对卡通 简单手绘头像短发女生头像 彼岸花头像代表什么 个性头像性感女 qq清新动漫女生头像2015最新版 qq头像不能动态图片