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
茶陵汽车中心站电话号码中国汽车站总部电话号码多少钱从青岛到高密的汽车苏州到水头汽车许昌到宁波的汽车时刻表查询茶陵汽车中心站电话号码火车票飞机票 汽车票从青岛到高密的汽车镇江到池州汽车站时刻表成都东站石羊场汽车站时刻表南京站的汽车站茶陵汽车中心站电话号码篷溪到绵阳汽车票时间济南 石家庄 长途汽车从青岛到高密的汽车成都东站石羊场汽车站时刻表杭州哪个汽车站到舟山长垣日照汽车多少钱长垣日照汽车多少钱赤壁北到汽车站庆阳到陇西汽车路线长垣日照汽车多少钱镇江到池州汽车站时刻表孝感到利川哪里可以买汽车票许昌到宁波的汽车时刻表查询汕头汽车总站到大埔苏州到水头汽车成都东站汽车时间表开原到秦皇岛汽车站时刻表篷溪到绵阳汽车票时间十年孕养血脉,成为他人祭品,少年古昊觉醒不死吞天诀,逆天崛起! 吞噬无尽星辰,脚踏万族臣服! 枪碎苍穹,龙破乾坤!他是古文系研究生,刚毕业,就去大都市打拼,没想到半路遇扒手,没了钱包手机,靠乞丐的救济过日子,可没想到的是,因为奇遇,与妖魔邪祟打交道,渐渐声名远播,因为相貌以及性格,得到许多个富家女的青睐,也结下了不少的梁子。演绎人生百态,都市人情冷暖,以及爱恨情仇! 啊~什么?兰若寺! 宿醉的梦晨一觉醒来,发现自己置身于破败的兰若寺! 怀里揣着一只七彩宝鼎~ 不会吧,虽然穿越小说没少看! 可是没想到今个儿轮到自己了! 穿越成谁不好,偏偏成了手无缚鸡之力的寒碜书生! 拿什么跟万恶的黑山老妖斗? 还好,随身携带了一个能够呼风唤雨的无敌模拟系统! 开启了他开挂的诛魔修仙之旅~【我可以回家吗?】 【我让人找过了,提瓦特大陆不在这个世界,也就是说,你可能回不去了。】 【我需要回去,那里有我的朋友、战友……】 【我帮你,不过,你可能需要在这里呆一会儿,巴尔泽布,或者说,雷电将军小姐】 邹锦辉看着面前的女孩,露出了一丝微笑。 雷电将军想了想,点了点头。 因为 是这个人,在自己受伤和虚弱的时候,救了自己。 【那么,你想要什么东西报答呢?】雷电将军笑着问对方。 【以后再说吧】 邹锦辉看着她,笑了笑。失去记忆的他,醒来后,竟然被卷入在某个阴谋当中,想要知道真相的他,用智慧开辟出了一条生存道路,披荆斩棘。穿梭在各个世界当中,努力完成各个任务,当然,也只有完成任务,获取金币,才能活下去,才能继续去寻找真相。在暗潮汹涌的任务栈台中,他该如何存活下来?如何去应对那一次次的突发情况?知道那所谓真相后的他,又该如何去做呢?与他一起穿梭千元,与他一起去探索真相,了解那千万纪元的世界!陈岁年离婚了,前妻嫌贫爱富,抛夫弃女。 没想到,刚离婚就觉醒了系统。 拥有了一块每天都能刷新出各种蔬菜、水果、药材的肥沃土地。 陈岁年决定在犹如世外桃源般的桃花村定居,没想到,系统隔三差五就送给他各种技能。 没过多久,陈岁年还发现,那块神奇的土地,仅仅只是系统的冰山一角! 更多的秘密,在等待着他去揭开!三岁,亲人就被阴兵抓走,自此妖魔横行,要自我于死地,又被飞僵追杀,道门的背叛。记录着关于斯卡德科技世界观及背景,其他的小说可以使用里面的任何设定,任何人都可以使用(需要提前标注),会不定期更新。(纯架空文) 邮轮失事,流落荒岛,危机四伏,当别人还在因为下暴雨无处躲寻的时候,秦渊已经在庇护所安稳的度过。 当别人饿肚子的时候,秦渊已经吃上了烤肉,海鲜。 失事船长:“我们要齐心协力,走出困境!” 秦渊:“不好意思,道不同不相为谋!” 有钱人:“兄弟,我花钱买你的肉,就让我吃一点!” 秦渊:“钱?在这岛上,就是废纸!” 当红女网红:“能不能分我们一口吃的?” 秦渊:“少跟我装可怜,这里是荒岛!”顾星辰,云锦山有史以来最年轻的天师,通阴阳明医术,占卜看相无所不能。五年期满,返回云镇,自此一代天师之名不胫而走。 风水堪舆,易如反掌;不治之症,一针救魂;牛鬼蛇神,一剑平之。 小小云镇,很快就成了首富大佬挤破头都想瞻仰的神圣之地。小小天师,畅游都市,只手定乾坤!
天宇守护神医 无限纪元之战神传说 平凡的公子 做民宿的那几年 无限调查团 腾云驾雾天使之吻 剑飞大陆 罪之王夜 我不是箭神 阶梯上的故事 老天爷赐给我的女朋友 我的宠兽都有外挂 汤姆掠夺诸天 归始入化 谷神的dio 原来我真是世外高人 我王凡没有开挂 小山的高中生活 战婿狂医 奴隶少年与傲娇公主那些事 永康温岭的汽车票价是多少钱 烟台到济南的长途汽车 杭州哪个汽车站到舟山 长垣日照汽车多少钱 永康温岭的汽车票价是多少钱 福州至漳州汽车 青岛有多少汽车站 吴淞汽车站 网上订票 汕头汽车总站到大埔 篷溪到绵阳汽车票时间 镇江到池州汽车站时刻表 郴州到宁远县汽车城 孝感到利川哪里可以买汽车票 成都东站石羊场汽车站时刻表 德兴至婺源汽车站时刻表 许昌到宁波的汽车时刻表查询 青岛有多少汽车站 汕头汽车总站到大埔 庆阳到陇西汽车路线 茶陵汽车中心站电话号码 烟台到济南的长途汽车 从青岛到高密的汽车 中国汽车站总部电话号码多少钱 济南 石家庄 长途汽车 成都东站石羊场汽车站时刻表 孝感到利川哪里可以买汽车票 汕头汽车总站到大埔 中国汽车站总部电话号码多少钱 庆阳到陇西汽车路线 汕头汽车总站到大埔 许昌到宁波的汽车时刻表查询 烟台到济南的长途汽车 苏州到水头汽车 茶陵汽车中心站电话号码 成都东站汽车时间表 许昌到宁波的汽车时刻表查询 台州到东莞汽车票价格多少 青岛有多少汽车站 孝感到利川哪里可以买汽车票 台州到东莞汽车票价格多少 许昌到宁波的汽车时刻表查询 北京到任丘汽车时刻表 赤壁北到汽车站 郴州到宁远县汽车城 济南 石家庄 长途汽车 烟台到济南的长途汽车 镇江到池州汽车站时刻表 苏州到水头汽车 开原到秦皇岛汽车站时刻表 火车票飞机票 汽车票 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 仙湮兮 待到缘分重来时 越空行者 星域神启 重生!数竞的我遇见她 快连下载 亚星游戏官网 亚星官网 快连下载 亚星管理平台 青岛有多少汽车站 中国汽车站总部电话号码多少钱 台州到东莞汽车票价格多少 烟台到济南的长途汽车 绍兴到台州椒江 汽车时刻表 许昌到宁波的汽车时刻表查询 福州至漳州汽车 成都东站石羊场汽车站时刻表 从青岛到高密的汽车 郴州到宁远县汽车城 青岛有多少汽车站 苏州到水头汽车 许昌到宁波的汽车时刻表查询 德兴至婺源汽车站时刻表 成都东站石羊场汽车站时刻表 南京站的汽车站 郴州到宁远县汽车城 火车票飞机票 汽车票 成都东站汽车时间表 成都东站石羊场汽车站时刻表 庆阳到陇西汽车路线 开原到秦皇岛汽车站时刻表 郴州到宁远县汽车城 苏州到水头汽车 福州至漳州汽车 镇江到池州汽车站时刻表 吴淞汽车站 网上订票 许昌到宁波的汽车时刻表查询 长垣日照汽车多少钱 茶陵汽车中心站电话号码