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
珠海到抚州汽车时刻表深圳福田至石龙汽车有龙头寺汽车站 地铁上海到沭阳的汽车台山到东莞的汽车站时刻表珠海到抚州汽车时刻表赤峰到沈阳的汽车龙头寺汽车站 地铁湖州到昆明长途汽车站时刻表上海到湖南益阳南县汽车票长春到鲁北汽车多久到珠海到抚州汽车时刻表铜梁汽车客运总站电话号码长春到鲁北汽车多久到龙头寺汽车站 地铁上海到湖南益阳南县汽车票吴中汽车站到楚州双鸭山长途汽车时刻表双鸭山长途汽车时刻表九江+瑞昌+汽车凯里到深圳的汽车双鸭山长途汽车时刻表安丘到黄岛汽车电话双峰到湘乡的汽车最早几点台山到东莞的汽车站时刻表东莞汽车总做35上海到沭阳的汽车济南到荣成汽车时刻表宿迁到响水汽车要多久铜梁汽车客运总站电话号码混沌起初,大陆分九界 大陆之上以武修为尊,每人都以登上更高的武道境界为目标 尘烽出生,天地异象云起,家族大喜,世间之人都觉得一代帝王出世 尘烽六岁便踏入气灵境成为方圆十城天之骄子,有人大喜便有人眼红,七岁生日那天,数名大陆顶级强者率领数万大军踏平尘府,唯有尘府最强者携尘烽一人逃出... 且看主角如何崛起复仇,登上大陆顶峰!当吴狄秉着爱国,诚信,敬业,友善的优良品质,混进金庸先生笔下的武侠世界当中,成为一名武当道士时 面对上辈子无数个夜晚在床上幻想过的武功秘籍,看见那一位位老爷子笔下倾城倾国的女猪脚们,吴狄表示 别无选择,唯有制霸江湖!谨以此书,纪念我高中时代光怪陆离的幻想羊城火车站下来了一个刚刚从部队回来的士兵,一个拥有无尽战力却前途黑暗的强者,拥有上古血脉的王者一个现代习武者重生到了平行的全职法师世界。 这里魔法为尊,法师从最基础的星子开始修炼魔法,一步步觉醒新的魔法系,迈向强者之路,和威胁人类的妖魔抗争。 蓝星的一切几乎都能在那里体现,唯独不同的是,这里的一切都用魔法解释,那些令人仰慕的伟人,也都是各系巅峰的法师。 “既然魔法只要远程轰炸就行,那历史书插图上的古人为何还要穿带盔甲武器?”前武者陈平百般不解,直到遇到了一次难得的机会。 “古代的魔法到底是什么,魔法源头又是怎么传承发展的?” “耍帅装13的事有莫大魔王就好,我还是低调而有内涵地钻研魔法吧,在这个奇趣的世界,只知道打打杀杀而不探索其中奥妙,未免太可惜了!” 外表看似平平无奇、内心向往光怪陆离的陈平,有挂而不外露,打算在“低调”的探索中,搞出一番大事业。钓鱼遭雷劈,周家父子一起穿越了。 老爹是皇帝,我是皇子,这回稳了吧。 睁眼朝堂阴谋,闭眼金银美人。 我得活着,我得保我老爹做千秋帝王。 练武是为了打架,敛财是为了强国,收美女,这个是为我自己。 老爹稳了,我就不用操心了,好好做我的第一纨绔,爽![不喜勿喷]一部日常啰嗦水文。我写文是随心,而不是随意。洛林:“我老婆就是个没毕业的小学生!每次去给她上课总有一万个理由给我找茬,明明菜的一批,却老是爱做白日梦去为了救那些毫不相干的人受伤,次次让我这君主救她,好在这傻姑娘的性格也就我受的了。” 铭可:“我老公洛林就是个大傻,英雄主义的色胚,还喜欢大晚上勾引别人,还自吹什么无敌流剑术!” 魔力受阻症诺修贝尔.洛林是魔族新继任的君主,但却让他的老师西仆真赶了出来,被迫前往皇家魔法学院教书,本应想着摆烂生活的他,却不曾想还要担任起那群学生的保姆,次次危险都要提刀去救,过够之前废柴生活的他,彻底麻了,但随着一个邪恶组织的产生,一系列的计划将围绕自己而展开。 疑似是绝世高手?一刀斩掉暗夜圣龙,无限次拔刀,竟然只是一位魔导师? 在初级魔导师,大魔导师,领主魔导师,域主魔导师,圣阶魔导师,归藏魔导师,神级魔导师遍布的世界里,带领着自己的三位可爱女弟子开启了冒险与学院的一段生活。上一世的他,整日沉醉在纸醉金迷中,直到妻女从高楼跃下的那一刻,他才幡然醒悟。 本想自杀的他却被高人所救,带到修仙世界,一路修炼,他成了世界上最年轻的仙帝! 在最后突破成仙之时,天劫降临,却让他回到妻女自杀之前。 重活一世,他发誓,自己余生必定好好珍惜妻子和女儿! 若有人胆敢伤害分毫,上九天,下黄泉,我必灭之!莫非应和图灿分离后换上了“双重人格”,三年后图灿回来第一件事就是找他,没想到在小姨的精神病院找到。同时她也没想到,她的男友居然是她的同类,她好不容易(意外)治好了莫非,却发现莫非居然不是人,但这并不妨碍他们在一起,莫非:“把我弄成这个样子,可要好好负责。”图灿一边流着口水一边说:“好好好。”
黑白无常叫我小先生 异界人才 黑河湾风云 天古帝尊 我带着面板在诸天轮回 精灵世界的聊天群大师 大炎帝国风云录 里游戏 屠妖佛之血域 浪荡人生 凌枫传 灭道一剑 我家女友真的超级可爱 大唐侠义传 独步天下,逍遥,天下独尊 再读一次初中 一江芙蓉半江月 列车爆炸案之时空来客 武者修罗 轮回相杀 大道之无恨 阜阳到揭阳汽车票价 衡阳到郑州汽车站时刻表 龙头寺汽车站 地铁 深圳福田至石龙汽车有 阜阳到揭阳汽车票价 广灵到北京汽车时间 金华到天台汽车票 双峰到湘乡的汽车最早几点 上海到湖南益阳南县汽车票 九江+瑞昌+汽车 台山到东莞的汽车站时刻表 上海到沭阳的汽车 铜梁汽车客运总站电话号码 济南到荣成汽车时刻表 吴中汽车站到楚州 凯里到深圳的汽车 金华到天台汽车票 上海到湖南益阳南县汽车票 宝安到南海汽车站 通榆的汽车时刻表 衡阳到郑州汽车站时刻表 肇庆有去番禺客运站的汽车吗 长春到鲁北汽车多久到 龙华汽车到龙岗地铁路线图 济南到荣成汽车时刻表 铜梁汽车客运总站电话号码 上海到湖南益阳南县汽车票 长春到鲁北汽车多久到 宝安到南海汽车站 上海到湖南益阳南县汽车票 凯里到深圳的汽车 衡阳到郑州汽车站时刻表 湖州到昆明长途汽车站时刻表 通榆的汽车时刻表 泉州市到安溪县的汽车 凯里到深圳的汽车 安丘到黄岛汽车电话 金华到天台汽车票 双峰到湘乡的汽车最早几点 金华到天台汽车票 台山到东莞的汽车站时刻表 泉州市到安溪县的汽车 九江+瑞昌+汽车 肇庆有去番禺客运站的汽车吗 宝安到南海汽车站 阜阳到揭阳汽车票价 安丘到黄岛汽车电话 上海到沭阳的汽车 宿迁到响水汽车要多久 赤峰到沈阳的汽车 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 签到十六年,我没想当皇帝 大唐:开局玄武门,我助李世民夺皇位 符镇天下 振武道霸主 心疼之爱 欧博官网 百家乐官网 亚星管理平台 欧博官网 亚星管理平台 吴中汽车站到楚州 凯里到深圳的汽车 龙头寺汽车站 地铁 长春到鲁北汽车多久到 安丘到黄岛汽车电话 上海到沭阳的汽车 东莞汽车总做35 上海到湖南益阳南县汽车票 珠海到抚州汽车时刻表 通榆的汽车时刻表 通榆的汽车时刻表 金华到天台汽车票 上海到沭阳的汽车 驻马店至漯河汽车票价 阜阳到揭阳汽车票价 台山到东莞的汽车站时刻表 赤峰到沈阳的汽车 泉州市到安溪县的汽车 宝安到南海汽车站 凯里到深圳的汽车 金华到天台汽车票 阜阳到揭阳汽车票价 驻马店至漯河汽车票价 赤峰到沈阳的汽车 双鸭山长途汽车时刻表 驻马店至漯河汽车票价 深圳福田至石龙汽车有 通榆的汽车时刻表 通榆的汽车时刻表 铜梁汽车客运总站电话号码