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
特10邮票发行量1984年的惊梦邮票邮票纪57凯旋归国3?D2安徙生童话邮票小版张美国三角形邮票特10邮票发行量新邮票申购技巧邮票纪57凯旋归国3?D2中国邮政孔雀80分邮票在哪可以卖邮票画一张保护环境的邮票特10邮票发行量大韩民国临时政府邮票画一张保护环境的邮票邮票纪57凯旋归国3?D2二战值钱的邮票十分邮票电报大楼美国三角形邮票美国三角形邮票去邮局买邮票的步骤环保邮票的设计大赛龙的邮票价格中国邮政孔雀80分邮票邮票印制局李昊马丁马年邮票1990假票美国集邮集团邮票安徙生童话邮票小版张邮票价值怎么算去邮局买邮票的步骤兔生肖邮票设计者因为先进科技的发展,能源需求越来越大,公元2200年,由于人类对地球进一步开发,环境遭到破坏,千年不变的生态规则被打破,随着一声诡异的破碎声在全世界响起,地球各处开始频繁发生地震,接着就是沙漠开始无规则地进行扩张,无论是工业气息浓厚的城市,还是绿植丰富的森林,都被沙粒所替代。没有办法,人类开始运用最新的科术,打造出诸多太空运输机,能源采集飞行器等太空科技,远离地球,在太空中生存发展。 公元2201年,科学家发现新生儿中极少一部分出现异常,有的是肤色异常,能随着周边的环境的变化而发生改变,如同变色龙一般,有的则是有6只手臂,新生儿握力达到25kg,有的则是大脑发达,经过简单的教导,便能进行简单的计算。但随着时间的推移,科学家们发现他们普遍活不过20岁。 公元2238年,第七管理区,一个狭小的房间中,一声沉闷的枪响发出,倒霉蛋何晓就出现在这个世界上了。在这尊卑的时代,欲望,成为衡量生命的意义。将灵魂奉献给神的痛苦是我对这时代最后的呐喊……年轻的拳王重生,带着上一世神奇的力量,看他如何纵横哈利波特世界一个死而另类复生的人,在人类的世界就已经不再属于参与者了,整个世界对于这个人而言只是一场长途的履行罢了。 重生为傻柱八岁的儿子-何晓。 激活了《情满四合院》和香江《大时代》融合签到系统。 秦寡妇,我爹地的钱必须连本带利还回来! 白眼狼棒梗,这房子是聋老太太留给我爹地的,你给我滚出去! 许大茂:何晓,叔求你了,这房子我不卖了成吗? 五蟹父子:何晓,老子做鬼也不会放过你! 陈万贤:既生贤,何生晓? 二十年前,龙国江城,第一世家裘家被一夜灭门,本以为一切都遮掩的没有一丝破绽,但是却没算到裘家最小的孩子活了下来,并且成为一代战神,他从来没忘却过家族的仇恨,只不过作为军人的操守,不会无故杀人,除了他的仇敌之外,但一切并不如他所想,他不杀人,不代表不会有人会因为他的追查而被灭口,就比如刚刚别灭的江城汪家,只是撕开了当年裘家灭门惨案的一角而已一个普通初中生,一次群架,从此开始了他不普通的人生。不合常理的拉拢,一次次的出乎意料,最终走向他早已注定的新人生。  诡秘力量复苏,元宇宙世界降临。   在这里,你能看到奇闻异录中的妖魔,恐怖故事里的鬼怪,甚至神话传说中那些古老的神祇!   在元宇宙世界中,所有人都在惶恐不安,心惊肉跳。   而江澈却发现自己能看到奇怪的提示。   于是……   在黄泉医院当护工,在阴间酒店当服务员,在轮回网吧当网管……甚至还在元宇宙世界建造了一座能够关押神明的监狱!   当江澈一次又一次完成诡秘挑战后,忽然发现。   他竟然已经成为了,诡秘之主。废柴修仙沥国末年,以澎国为首的、玥、岐三国欲撕破泯心之约重新制霸天下,短短一月间沥国便被战争波及覆没,天下再次陷入大乱之中,九州之地各处充满了争与血的景象! 群雄争霸,英雄辈出。一把剑,一壶酒,一缕情殇! 刀光剑影中,一位满腹热血的少年持剑走入纷乱破碎的江湖中: “让我看看,新的江湖会有何有趣的事情发生?!”
异梦怪谈 黄泉路81号 龙吟五洲 起始黎明 天选传奇 我变成了鬼! 寒门枭龙 秦刀行 帝哥不要宠猴了 震惊:我的祖仙是大佬! 异世:开局吞噬系统 屹立在世界尽头的人 我就是大王 传奇不只是游戏 幻界:神魔录 进激的体育老师 人口时代 我心中所想的宇宙 五彩斑斓的守护 开局一座城 美国集邮集团邮票 二战值钱的邮票 淘宝外国盖销戳邮票 美国三角形邮票 1984年的惊梦邮票 邮票价值怎么算 淘宝外国盖销戳邮票 黄山邮票行情 两分飞行员邮票 大韩民国临时政府邮票 中国人民邮政邮票全套 中国人民邮政邮票全套 邮票印制局李昊马丁 二战值钱的邮票 特10邮票发行量 马年邮票1990假票 杜娟小型张邮票珍藏册 美国集邮集团邮票 j.44邮票 邮票纪57凯旋归国3?D2 1981年金陵十二钗邮票 邮票纪57凯旋归国3?D2 j.44邮票 龙的邮票价格 在哪可以卖邮票 长江三峡一张邮票价格 美国集邮集团邮票 j.44邮票 j.44邮票 两分飞行员邮票 美国三角形邮票 1981年金陵十二钗邮票 安徙生童话邮票小版张 特10邮票发行量 邮票印制局李昊马丁 马年邮票1990假票 安徙生童话邮票小版张 淘宝外国盖销戳邮票 邮票印制局李昊马丁 邮票 1995 17 马年邮票1990假票 黄山邮票行情 去邮局买邮票的步骤 杜娟小型张邮票珍藏册 画一张保护环境的邮票 1981年金陵十二钗邮票 中国人民邮政邮票全套 马年邮票1990假票 长江三峡一张邮票价格 十分邮票电报大楼 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 不灭造化决 罪恶圆环 八块大陆 玩牌的我谁都打不过 万灵灭魔阵 亚星管理平台 亚星官网 万利游戏官网 亚星管理平台 澳门葡京游戏官网 龙的邮票价格 二战值钱的邮票 淘宝外国盖销戳邮票 二战值钱的邮票 画一张保护环境的邮票 黄山邮票行情 去邮局买邮票的步骤 邮票纪57凯旋归国3?D2 特10邮票发行量 新邮票申购技巧 在哪可以卖邮票 新邮票申购技巧 美国集邮集团邮票 两分飞行员邮票 十分邮票电报大楼 龙的邮票价格 两分飞行员邮票 长江三峡一张邮票价格 长江三峡一张邮票价格 环保邮票的设计大赛 杜娟小型张邮票珍藏册 去邮局买邮票的步骤 画一张保护环境的邮票 二战值钱的邮票 1981年金陵十二钗邮票 特10邮票发行量 中国邮政孔雀80分邮票 美国集邮集团邮票 邮票纪57凯旋归国3?D2 安徙生童话邮票小版张