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
鄱阳火车票什么时候开始售票抚顺到大连金州的火车蚌埠到北京火车多少里程连云港市到菏泽的火车扬中到盐城火车站有多远定西到敦煌有火车吗?西安到武汉火车运行图蚌埠到北京火车多少里程拉萨火车至成都票价查询集宁南到下花园火车站时刻表前苇塘停点的火车鄱阳火车票什么时候开始售票玉溪至昭通火车时刻表广州至山东枣庄火车几点的蚌埠到北京火车多少里程集宁南到下花园火车站时刻表襄樊到徐州火车时刻表 百度木渎有代购火车票的木渎有代购火车票的肇庆至阳江有火车吗湘乡火车2017年时刻表木渎有代购火车票的拉萨火车至成都票价查询禹城到锦州的火车扬中到盐城火车站有多远南京南至仪征火车连云港市到菏泽的火车长沙·火车到安徽广州到江山如何坐火车去玉溪至昭通火车时刻表【玄尘日记】 穿越第八年,八岁,总算能练武了,武林,我玄尘来了! 十六岁了,我的武侠梦破了,穿越武侠,不能练内功,老天你在玩我! 二十岁,我离开了生活了二十年的少林,凭我的医术毒术,富贵一生无忧! 二十四岁,帮父母报完仇,我开了一家医馆,生意不错。 二十五岁,人生无常,大肠包小肠,好好的武侠风怎么突然就变了呢!大武王朝,邪异降临,诡异杀人于无形。 江夜携带修改器穿越。 燃血功+一气功,破极【炎阳神功】。 牛魔大力拳+十三太保横练,破极牛魔大力拳.真意。【牛魔真身】 狂风刀+黑虎刀法,破极【霸刀诀】。 疾风掠影+御风步,破极【御风隐形】轻功。 生死看淡,不服就干,这是一个以蛮力,武道,横推一切的故事。本文主人公文春水,是个高考落榜的农村青年。本文主要写了文春水坎坷的人生,和他缠绵悱恻的罗曼史。他多才多艺,文静儒雅,一表人才。他为人正直善良,但命运坎坷,爱情多磨难……刀光剑影快意恩仇,江湖二字,奇妙热烈,总令人心潮涌动。少年意气弹铗高歌,倾盖如故的兄弟,风流婉约的美人,谁说鱼与熊掌不能兼得? 无尽世界有无尽故事,无尽故事,生无量因果。因果纠缠之下,必有逢厄遭难后不能释怀者。 冰消为博一线成人造化,穿梭诸多世界,证神魂唯一。解彼灾厄,全我机缘。作者bananana,12岁,爱创作的猫头鹰假如在这个世界上有如果… 命运玄之又玄,无数人不信命,却不得不成为命运中的一环。在时间的尽头,诠释着一个个早已安排好的阴谋,他只不过是一个引子…游戏与考试有时可以实现完美结合,而道德也应该影响考试的结果,某个班级里的十五名男生也这么想。他们个个都在某些领域有着自己的专长,也有着自己致命的缺陷。他们有的出身显赫,父母都热爱读书;有的却不幸出身于一个思想境界低下的家庭,不慎被家庭影响,坠入无底深渊。突然,他们被卷入了一场场特殊的考试之中,他们需要用自己学过的知识去应对各种各样的险境。你认为他们能成功吗?穿越到了火影世界,穿越成为未被灭族的漩涡一族的族人,好在作为穿越者他也拥有必备的金手指系统,能够复制万能系统,我看一眼你这个禁术不错拿来吧,你这个血继限界不错拿来吧,你强任你强,系统最猖狂。
与天记 吞噬帝尊南战天 我是守界人 万界第一皇 重生我再也不会啃老了 大道之无恨 永恒帝师 名劫 不想内卷,所以我全点了治疗 玄幻:我的女帝徒弟要黑化 极品回春大国医 我若成魔那又如何 穿越秦朝之始皇是我兄弟 宗门养成:我的师父超佛系 废土巫师 全球高武:天赋放大一万倍 正太老师的日常生活 我的三十六岁女房东 东厂恩仇记 诸天从葫芦娃开始 遂宁到绍兴火车时刻表 哈尔滨到四平火车票价格 襄樊到徐州火车时刻表 百度 木渎有代购火车票的 遂宁到绍兴火车时刻表 火车票可以多久退票吗 北京至宁波z9火车 常德至江门火车 南京南至仪征火车 玉溪至昭通火车时刻表 拉萨火车至成都票价查询 阿克苏火车到拉萨 禹城到锦州的火车 集宁南到下花园火车站时刻表 定西到敦煌有火车吗? 扬中到盐城火车站有多远 北京至宁波z9火车 南京南至仪征火车 湘乡火车2017年时刻表 鄱阳火车票什么时候开始售票 哈尔滨到四平火车票价格 蚌埠到北京火车多少里程 抚顺到大连金州的火车 广州至山东枣庄火车几点的 集宁南到下花园火车站时刻表 禹城到锦州的火车 南京南至仪征火车 抚顺到大连金州的火车 湘乡火车2017年时刻表 南京南至仪征火车 扬中到盐城火车站有多远 哈尔滨到四平火车票价格 从天津到滨州火车 鄱阳火车票什么时候开始售票 长沙·火车到安徽 扬中到盐城火车站有多远 从天津到滨州火车 北京至宁波z9火车 禹城到锦州的火车 从天津到滨州火车 扬中到盐城火车站有多远 牡丹江火车站到牡丹江机场大巴时刻表查询 肇庆至阳江有火车吗 阿克苏火车到拉萨 广州至山东枣庄火车几点的 哈尔滨到四平火车票价格 拉萨火车至成都票价查询 连云港市到菏泽的火车 广州到江山如何坐火车去 西安到武汉火车运行图 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 网游:肉搏祭祀 大秦:开局觉醒暗影系统 我们不是疯子也不是天才 幕后:戏耍气运之子 蓝星:三维的末路 百度 百度 百度 百度 百度 玉溪至昭通火车时刻表 阿克苏火车到拉萨 肇庆至阳江有火车吗 连云港市到菏泽的火车 襄樊到徐州火车时刻表 百度 鄱阳火车票什么时候开始售票 湘乡火车2017年时刻表 木渎有代购火车票的 禹城到锦州的火车 玉溪至昭通火车时刻表 玉溪至昭通火车时刻表 定西到敦煌有火车吗? 鄱阳火车票什么时候开始售票 长沙·火车到安徽 木渎有代购火车票的 蚌埠到北京火车多少里程 牡丹江火车站到牡丹江机场大巴时刻表查询 哈尔滨到四平火车票价格 广州火车站的地铁站口 连云港市到菏泽的火车 西安到武汉火车运行图 抚顺到大连金州的火车 牡丹江火车站到牡丹江机场大巴时刻表查询 禹城到锦州的火车 拉萨火车至成都票价查询 玉溪至昭通火车时刻表 扬中到盐城火车站有多远 肇庆至阳江有火车吗 定西到敦煌有火车吗? 火车票可以多久退票吗 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网