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
临平北站到临安汽车时刻表莒县到郑州汽车电话号码金口河到眉山汽车电话凤台县到淮南的汽车都江堰到龙泉汽车青岛东站到成都汽车票韩城的汽车站电话金口河到眉山汽车电话陆丰至花都汽车站时刻表南京到长集的汽车电城到茂名汽车临平北站到临安汽车时刻表改汽车票时间南昌到鄱阳什么汽车站金口河到眉山汽车电话南京到长集的汽车金口河到眉山汽车电话莒县到郑州汽车电话号码莒县到郑州汽车电话号码衡阳到松柏的汽车南昌到鄱阳什么汽车站莒县到郑州汽车电话号码都江堰到龙泉汽车合阳汽车时刻表深圳到湛江汽车票查询南京到长集的汽车广州汽车站到邵阳合阳汽车时刻表衡阳到松柏的汽车茅山有汽车站吗在华盛顿发生了一件重大的杀人案,特工梅里劳斯的女儿琳达在一件任务中不幸被无形的凶手K发现并且杀害,诱人的一千美刀吸引梅里劳斯的战友们在一个月内找到凶手,奇怪的艾尔警官,神秘的玩偶和无形的凶手到底是怎么回事?赶快来看看吧! 时代无情,岁月流逝。想要成为天地间最强大的存在需,勿忘初心,面对世间种种困难,不惧因果,敢于尝试,学会放弃。这是一个混乱的世道,看一对小乞丐怎么逆袭,成为一方霸主!!!大脑中的意识瞬间被灌入的海水淹没 “卧底三年就这样结束了吗?”萧子昂不甘、后悔、愤怒的情感充斥全身………… 前朝太子?孤独两世?也好,既然重生在这乱世,那就为自己活一次。繁华盛地与乱战兼并并存,妖兽人魔具在。权势、钱财不如所爱之人一颦一笑,我在,即为惊鸿人间宴。神说:太初有道,道即是神! 魔曰:太初有道,魔于道先! 有魔,先于道而生!这不仅仅是某人的自夸,更牵扯到他证道的隐秘。 九州之变,魔星降世,灵石下凡,洪荒秘闻…… 道之所存,魔之所在!且看天魔周游各方世界,追逐魔之本源,成就无上道果! 虚空降临,魔物肆虐。 为了抵抗这一切,每个人都会在十八岁时,觉醒自己的天命武器。 刀枪剑戟,斧钺钩叉,各种各样的天命武器层出不穷。 甚至还有人觉醒出了书籍,乐器,宝石等一类特殊武器。 草率穿越来到这个世界的石灿,不仅获得了一个【怂6】系统,还在系统的改变下觉醒了厚实表皮。 正当所有人都对魔物避之不及时,石灿却自信歪嘴一笑叫嚣所有魔物。 “在下一脸,可抗逼兜,拳头,臭脚,谩骂,嘲讽,刀剑,不服来战!” 虽然我是救世主,但我很低调,遇到敌人打的过就打,打不过我就滚!猥琐发育,别浪! 九州大陆,万国林立。   赢云穿越大秦,成为始皇第九子,并获得了咸鱼系统,只要咸鱼,就可以持续不断的获得奖励。   于是,   赢云直接咸鱼起来,默默签到,不仅获得了无数奖励,还顺利突破,成了九州唯一一尊陆地神仙!   ……   有一日,   天降金榜,盘点最强生灵。   只见,   大漠之中,赢云一剑开天门,入陆地神仙,屠数十万军,举世震惊!   帝释天:“什么?这世界上还有比我更强的人?!”   孤独求败:“杀尽仇寇,败尽英雄,平求一敌手而不可得!这赢云,值得一战!”   ……   紧接着,   天道神兵榜、天军榜等相继曝光。   神兵榜第一,圣剑轩辕,属大秦九皇子赢云!   天军榜第一,大雪龙骑,属大秦九皇子赢云!   ……   嬴政:“这是朕那咸鱼儿子?!”   ……转生成了废材又能怎样,我仅仅只是想要活下去,想要好好的活下去而已! 在这个世界里我也有想保护的人,有想要去追求的人,即使拼上性命那又如何? 没有金手指那又如何? 我的前一世的经历便是我最好的助力。永恒圣堂门开,狂雷洗涤异世之魂。拥有神识海的骑士学徒,死不瞑目的元素魔法师。一直被坑的丁馗集两家血脉传承精髓,走上空前绝后的法武双修之路。积功开辟根据地,以一隅谋全国,靠的是两世战争经验。人魔最终之战时,毅然舍去历尽千辛万苦所取得的一切。神圣,神圣,原来神之上是圣!
炼天剑神 射仙问道 仙警局 特利迦Ultraman Trigger 帝国驸马爷 天轮回道回忆录 穿越大商:迎娶寡妇妻 剑入仙道 我加载了危险游戏 穿越两界的大明星 天源太虚 我在修仙界有百万粉丝 重建人类文明 :城邦 传奇不只是游戏 最上是魔 灵祎事件 我的祖宗 魔沦 道门幸存者 前传:异世奇闻录 合肥到桐乡汽车电话号码是多少钱 凤台县到淮南的汽车 南京到昆明 汽车时刻表查询 青岛东站到成都汽车票 临沂到杭州汽车几点的 广州汽车站到邵阳 南京到昆明 汽车时刻表查询 莒县到郑州汽车电话号码 都江堰到龙泉汽车 兰陵汽车站宾馆招聘信息 茅山有汽车站吗 茅山有汽车站吗 南昌到鄱阳什么汽车站 广州汽车站到邵阳 南京到昆明 汽车时刻表查询 韩城的汽车站电话 茅山去句容汽车站时刻表 凤台县到淮南的汽车 金口河到眉山汽车电话 合阳汽车时刻表 陆丰至花都汽车站时刻表 合阳汽车时刻表 金口河到眉山汽车电话 临沂到杭州汽车几点的 深圳到湛江汽车票查询 电城到茂名汽车 凤台县到淮南的汽车 莒县到郑州汽车电话号码 深圳到湛江汽车票查询 平阴至济宁的汽车多长时间 都江堰到龙泉汽车 大连华南汽车广场站 青州市汽车站客服电话 临平北站到临安汽车时刻表 汽车广州到东莞要多久时间 都江堰到龙泉汽车 青州市汽车站客服电话 金阳到思南的汽车 桂林至长沙汽车时刻表查询系统 金口河到眉山汽车电话 凤台县到淮南的汽车 合阳汽车时刻表 茅山有汽车站吗 合肥到桐乡汽车电话号码是多少钱 南昌到鄱阳什么汽车站 大连华南汽车广场站 合肥到桐乡汽车电话号码是多少钱 凤台县到淮南的汽车 茅山去句容汽车站时刻表 韩城的汽车站电话 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星游戏官网 逐渐离谱的故事 昌南玖事 都成圣主了,让我回地球? 破天机系列之困天迷龙局 天宇守护神医 万利官网 万利游戏官网 万利官网 亚星游戏官网 欧博游戏官网 青州市汽车站客服电话 凤台县到淮南的汽车 大连华南汽车广场站 南京到昆明 汽车时刻表查询 金阳到思南的汽车 桂林至长沙汽车时刻表查询系统 青州市汽车站客服电话 莒县到郑州汽车电话号码 平阴至济宁的汽车多长时间 衡阳到松柏的汽车 陆丰至花都汽车站时刻表 南京到长集的汽车 汽车广州到东莞要多久时间 汽车广州到东莞要多久时间 深圳到湛江汽车票查询 莒县到郑州汽车电话号码 临沂到杭州汽车几点的 陆丰至花都汽车站时刻表 韩城的汽车站电话 南京到昆明 汽车时刻表查询 金阳到思南的汽车 桂林至长沙汽车时刻表查询系统 青州市汽车站客服电话 衡阳到松柏的汽车 茅山有汽车站吗 陆丰至花都汽车站时刻表 临沂到杭州汽车几点的 电城到茂名汽车 平阴至济宁的汽车多长时间 平阴至济宁的汽车多长时间