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
韩国电影分级r美国电影叛国者我爱上电影网我要上学电影问答题电影 grace韩国电影分级rjay-z电影我爱上电影网九歌电影完整版在线看看电影什么厅好武侠电影大醉侠我爱上电影网电影院的椅子会随着电影来回晃荡武侠电影大醉侠微电影 遥远的远方看电影什么厅好电影侯爵日本电影 告白里的闹钟怎么弄的电影 grace龙腾虎跃+1983+电影太平轮 电影下载日本电影 告白里的闹钟怎么弄的九歌电影完整版在线看小浪电影网 免费中国电影导演协会2013泄密电影中国电影导演协会2013小浪电影网 免费龙腾虎跃+1983+电影screenx电影现代人庄周在梦中成为了三国末世蜀国皇帝刘禅,人人尽知的刘阿斗每日寝宫梦中变成了二十一世纪的都市屌丝庄周。一个有领先千年的现代历史知识的人能借助皇帝的权势改变历史吗?一个夜夜帝王梦的现代屌丝能立志改变命运吗?如果继续这样下去的话,自己早晚有一天会彻底放弃的。因为他已经不再属于部队,也无法再上阵杀敌了,这是一个残酷的现实。上古世界,神魔共舞,凶兽横行,修士纵横…… 这一切终归跳不出天道法则的支配。 净世法则之下,一切皆归虚无。 毁灭不过一瞬间,重塑辉煌却需无数岁月。 天道崩灭,推倒重塑,谁甘心再入轮回! 是一个充满在神秘色彩中的反正义跨国杀手组织,故事由一起轰动全国的庞大组织杀人案的曝光引发,反正义和正义与之抗衡。一个顶尖的剑客,为情遭人陷害,武功禁失,力经千难万险,恢复自己的功夫。 一个失了忆的刀客,初入江湖,想找回记忆,可是江湖险恶让想找回失忆的刀客受尽艰辛苦难。 这样奇葩的一刀一剑相遇了,他们会在江湖中刀歌剑舞着自己的故事稳坐心理学领域领军交椅的秦尧,在一次犯罪团伙交战中被人开枪打死了,等他再次睁开眼睛时,他竟然成了一国之君,君临天下的他,在面对诡谲波澜的皇权争夺战中,他能否稳操胜券,力挽狂澜稳定朝堂?更有甚者当初开枪打死他的人,竟然成为了外番与之交好的献礼……本是千万富翁,却遭遇破产危机,结婚六年的妻子还送给我一顶大大的绿帽。 人生低谷,却无意间结识美女总裁。 为还自己清白,我重振昔日辉煌,不仅要手刃仇人,我还要让那些瞧不起我的人跪下来叫我爸爸。 人性是善是恶,争论千年无休止。 而我的故事就要从人性上开始说起…为了男人的承诺,萧晨强势回归,化身美女总裁的贴身保镖,横扫八方之敌,谱写王者传奇!   他——   登巅峰,掌生死,醒掌天下权,醉卧美人膝! —————— 小舞的微信公众号:寂mo的舞者,可以去关注哦! 小舞的QQ:1589045849,可以去加好友! 唯舞独尊①群:545765633!   搬家工人杨林因被挂钟砸头而穿越玄幻世界,并成为一个微末小村长。 可这世界众强争霸,山贼横行,凶兽成灾,危机四伏,常人根本难以生存。 还好杨林获得了超能力,不仅能加速事物成长,还能让事物发生变异。 从此,他种珍草,养灵兽,炼仙丹,修神通! 多年后,村子里灵气滔天,龙盘凤栖,万灵来朝,俨然一派圣地景象! 众国主:杨大人所指的方向,就是我们的战场! 众势力:这辈子最幸运的事就是成为杨大人的附庸! 隐居大能:在下前来向杨大人求药!扑通… 不知不觉,杨林已经天下无敌。 杨林:我发四,我的初衷只是为了活下去,根本没想要称霸啊… 唐末五代十国,军阀混战时期,外族趁乱而入,企图先霸武林,里应外合,再图中原天下。 一系水尊,九转玄阴之体,带领群雄,瓦解阴谋,驱除外敌,助后周太祖平定天下。
救命我活在两条时间上 一品宰辅 赢得天下薄幸名 天道九梯 坎坷修仙录 都市猎仙人 都市:言出法随,你管这叫乌鸦嘴? 深秋时节 女总裁的神医兵王 八十锤 天地玄宗 乱世豪杰传奇 第一次遇见神待少女 种田,我靠塔防征服废土 网游之天命大法师 仙剑无间道 远古尸毒 老留 百变书生 异世重生的神王 老人电影 时间不要太长 番禺万达广场电影院imax绝命海拔 电影侯爵 电影 grace 老人电影 时间不要太长 小浪电影网 电影侯爵 美洲狮公司 电影 泄密电影 电影院的椅子会随着电影来回晃荡 三国演义电影完整版 三国演义电影完整版 长得像姨太太 假冒 电影 番禺万达广场电影院imax绝命海拔 韩国电影分级r 电影 grace 2013最新印度电影 老人电影 时间不要太长 有关美国士兵逃亡的电影 我爱上电影网 番禺万达广场电影院imax绝命海拔 我爱上电影网 有关美国士兵逃亡的电影 日本电影 告白里的闹钟怎么弄的 看电影什么厅好 长得像姨太太 假冒 电影 老人电影 时间不要太长 美国电影叛国者 有关美国士兵逃亡的电影 泄密电影 电影 grace 法国嘎纳入围的电影短片 我要上学电影问答题 韩国电影分级r 小浪电影网 免费 中国电影导演协会2013 我要上学电影问答题 电影侯爵 小浪电影网 免费 微电影 遥远的远方 中国电影导演协会2013 美洲狮公司 电影 电影大耳朵有福 2013最新印度电影 武侠电影大醉侠 法国嘎纳入围的电影短片 三国演义电影完整版 中国电影导演协会2013 长得像姨太太 假冒 电影 悬疑黄色微电影 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 复仇男神 因为怕痛所以全点防御力了 外围高手 每晚,一个诡故事 胭脂河 AG真人 欧博官网 亚星游戏官网 AG真人 百家乐官网 韩国电影分级r 电影 grace 电影侯爵 有关美国士兵逃亡的电影 我要上学电影问答题 2013最新印度电影 法国嘎纳入围的电影短片 老人电影 时间不要太长 jay-z电影 韩国电影分级r 韩国电影分级r 2013最新印度电影 三国演义电影完整版 screenx电影 美国电影叛国者 九歌电影完整版在线看 电影大耳朵有福 小浪电影网 免费 武侠电影大醉侠 有关美国士兵逃亡的电影 微电影 遥远的远方 番禺万达广场电影院imax绝命海拔 电影大耳朵有福 jay-z电影 日本电影 告白里的闹钟怎么弄的 韩国电影分级r 有关美国士兵逃亡的电影 电影侯爵 2013最新印度电影 电影院的椅子会随着电影来回晃荡