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
方子哥2015电视剧电视剧盘非反黑电视剧陈小春吉吉电视剧最新电视剧欢乐颂电视剧17集方子哥2015电视剧电视剧女特警第二季反黑电视剧陈小春吉吉你是哪里人电视剧电视剧穿越剧抗日电视剧荡寇方子哥2015电视剧秦时明月电视剧蓉儿抗日电视剧荡寇反黑电视剧陈小春吉吉电视剧穿越剧电视剧平原作战金瑟祺电视剧金瑟祺电视剧虎妈猫爸电视剧第7集血缘电视剧刘诗诗正在拍的电视剧电视剧辘轳女人和狗走出大山电视剧欢乐颂电视剧17集幕后枭雄 电视剧电视剧最新电视剧欢迎收看什么电视剧虎妈猫爸电视剧第7集秦时明月电视剧蓉儿无教他炸金花;和他去开矿,教他学经商,陪他去泡妞,跟他去打架。以汉朝历史为背景,讲述一个平民小子,如何一步步成长为皇帝。 新人,新书,希望大家支持!十年前家族被灭,被一小姑娘所救,如今下山却发现那救他的小姑娘竟是林家二小姐,不料却吃了林家闭门羹,还好苏浩有五个师叔! 大师叔:镇北军战神,战力无双! 二师叔:龙国十品相师,精通奇门遁甲! 三师叔:龙国绝品神医,可妙手回春! 四师叔:龙国十大家族之首家主,统领八方! 五师叔:镇龙殿殿主……绝艳动人!21世纪的图书管理员李北牧,魂穿架空古代。 意外发现上辈子看过的书,竟然都能只字不差地回忆起来,有这样的金手指在手,怎么也能混的风生水起吧? 太平当盛世,他起初的目的只想在这没有人权的封建社会当个富家翁悠闲度日。 …… 多年以后,李北牧回首前尘,身后已是早已逝去的敌人以及累累白骨。 “不是我下手太狠,只是有些人,实在是太经不起折腾了。”李·大楚国相·定北公·世界首富·无冕之皇·北牧如是说道。他是一个红三代,为了先辈的嘱托和期望,用坚定的信念支撑着自己,走出了一条充满信仰的人生。他有优越的条件可以享受人生,但是,他抛弃了这些,毅然决然地走进了大山深处,从贫瘠的泥土中成长起来,一步一个脚印地成长为自己心中的顽强战士……失忆的少年,醒来后唯一所拥有的只有身边的一把黑剑。他渴望回忆起自己的记忆,机缘之下,少年救下了一名美丽的少女,少女作为回报愿意无条件的收留并帮助他寻回记忆,从此以后,少年以一名学生的身份重新开始生活。命运的齿轮同时开始旋转,不断回忆起来的记忆碎片,为何都与千年前的魔王有关呢?一个个的邪星士,一个个的记忆碎片,在记忆的碎片面前,他会做出如何的抉择呢?他最后的愿望,又会带领这个世界走向怎样的尽头呢?穿越神灵大陆后,林不凡被迫下嫁给一头母老虎,还是一头动不动以死相逼的冷傲暴力母老虎。 面对即将到来的家暴日子,这让林不凡感到很绝望。 幸好,神级选择系统成功激活。 穿越这事没得选,但要下嫁暴力母老虎,林不凡决定做一个以理服人的有为之人。 “叮!感知到宿主诚挚叫大爷,神级选择系统激活。” “选择:强行亲她,奖励至尊道体、太古神诀。” 婚礼现场。 “选择:怒怼万族来宾,奖励百年修为、破妄之眼、太上炼丹术、涅槃真丹。” 林不凡答应……还是拒绝呢? 答应是作死,拒绝貌似不能够。 于是…… 男主生活重担之下决定创业,经历了出轨创伤,生意压力,投资失败,被设计陷害,本就创业艰难还历经磨难,九死一生,仍在艰难前行,只要不认输就没有输,,,,,别人的高三可能都是抓紧时间去考大学,而他的高三却是在生死之间徘徊,甚至干脆直接就冒着生命危险去和凶手对峙了。当然虽然这份人设有点过于单调,所以说在这过程中也是开开后宫。玩弄并感受着人情世故,也被人情世故玩弄着,或许这就是人生吧。 明显最开始,只要不去刻意的管的话,那么一切都是安稳起来的。但是因为有着强大的好奇心,所以便有了之后的这份回忆录…
法之起灵 凡人轶事录 开局获得最强宗门系统 海贼里的傀儡之剑 都市,姑娘按摩不 神之旅I:天命箭祖 陌上花开之徐徐而归 灵气复苏我有幻想置换器 仙人庵 会长不菜 傲世天下之神州 无名之辈:巨石之下 星辰宿命 修仙剑传 足球少年之摘星 愛在海市蜃楼那一边 秦天战神 系统修仙:惨遭天道封印 九转还阳剑 毁坏的三观 风雨燕归来电视剧文本 情战电视剧全集主题曲 电视剧平原作战 金瑟祺电视剧 风雨燕归来电视剧文本 猎人笔记之谜 电视剧下载 电视剧少帅大结局 韩佳人主演的电视剧有 幕后枭雄 电视剧 秦时明月电视剧蓉儿 电视剧辘轳女人和狗 电视剧辘轳女人和狗 走出大山电视剧 电视剧穿越剧 最后一战电视剧34 欢乐颂电视剧17集 电视剧白昼追踪 幕后枭雄 电视剧 血缘电视剧 方子哥2015电视剧 情战电视剧全集主题曲 反黑电视剧陈小春吉吉 电视剧盘非 刘诗诗正在拍的电视剧 韩佳人主演的电视剧有 走出大山电视剧 幕后枭雄 电视剧 电视剧盘非 血缘电视剧 幕后枭雄 电视剧 金瑟祺电视剧 情战电视剧全集主题曲 电视剧最新电视剧 方子哥2015电视剧 走出大山电视剧 欢乐颂电视剧17集 林正英鬼太后是电视剧 电视剧少帅大结局 走出大山电视剧 林正英鬼太后是电视剧 欢乐颂电视剧17集 天什么一什么的电视剧全集 虎妈猫爸电视剧第7集 电视剧白昼追踪 刘诗诗正在拍的电视剧 情战电视剧全集主题曲 电视剧辘轳女人和狗 电视剧最新电视剧 韩剧tv怎么保存电视剧 电视剧女特警第二季 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 都市小东邪 黑雾入侵,我能加载游戏 长安一片花 无字天书之仁武天下 我有空间千顷田 亚星管理平台 亚星官网 万利游戏官网 亚星管理平台 澳门葡京官网 抗日电视剧荡寇 欢迎收看什么电视剧 方子哥2015电视剧 情战电视剧全集主题曲 反黑电视剧陈小春吉吉 虎妈猫爸电视剧第7集 电视剧最新电视剧 血缘电视剧 电视剧女特警第二季 电视剧盘非 金瑟祺电视剧 林正英鬼太后是电视剧 刘诗诗正在拍的电视剧 电视剧女特警第二季 情战电视剧全集主题曲 刘诗诗正在拍的电视剧 韩剧tv怎么保存电视剧 抗日电视剧荡寇 韩佳人主演的电视剧有 电视剧辘轳女人和狗 天什么一什么的电视剧全集 情战电视剧全集主题曲 猎刃电视剧歌曲 方子哥2015电视剧 电视剧最新电视剧 反黑电视剧陈小春吉吉 电视剧少帅大结局 秦时明月电视剧蓉儿 电视剧少帅大结局 猎人笔记之谜 电视剧下载