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
武山2017历史天气预报北京天气晕西安天气7月23日重庆近三天天气百度10天四川江油天气武山2017历史天气预报江油未来一月天气预报西安天气7月23日天气里的体感度是什么江油北未来一周天气广东金子山天气武山2017历史天气预报江油市历史天气广东金子山天气西安天气7月23日江油北未来一周天气金子山天气2345百度10天四川江油天气百度10天四川江油天气上海5月3日-7日天气文山四月天气预报关于金子山天气预报天气里的体感度是什么汕头南澳岛 天气重庆天气7天预报关于云和天气重庆近三天天气华南海天气上海5月3日-7日天气江油天气预报30tian李乘风悲催的被破了九世纯阳,誓要重回仙界,找到她弄个清楚明白,拥有万年感悟、帝尊心境,实力飞升如梭,李乘风不是天才,他只杀所谓的天才!穿越洪荒百万年,还是玄仙修为   林长青绝望之际,师尊通天赐予九转金丹   没想到,竟然觉醒诸天赠送系统!   赠送九转金丹,返还百亿功德!   赠送通天剑符,返还神象镇狱劲!   赠送黄中李,返还混沌灵根!   赠送盘古精血,返还……   林长青行走洪荒,赠送无数宝物,杀妖,屠魔,救人族!   终于,当量劫降临之时,林长青一人横立量劫之前,挥手扫灭无边劫云!一条深沟,尽隔战乱与诸侯;一片雾海,皆折豪雄与勇谋。我们看不到希望,我们看的到希望。寂灭深处,尽头才是新春秋。 “所以我相信,复仇也许并不会带来真正的胜利,但是如果我不做出努力,我不为了这个目标而奋斗,那么未来将对我更坏,在有实力的前提下我可以饶了过去的邪恶,但咱那之前又有谁能够饶了我?”九荒世界百族林立,上古时期人族、海族、修罗族、魔族、妖族、鬼族等强大种族为争夺天地第一神器无量芥子天庭爆发大战,使得各族元气大伤,百族不得不归隐。拥有混沌圣体的帝天羽无意间得到天庭,从此开始了他的征伐九荒、战百族之途。平八荒、征魔族,立天庭、建地狱、控六道轮回 ,封神碑分封诸神,成为万族共尊的天帝。 天庭势力组成:九阁十八殿三十六宫七十二部。 天罚阁,直隶于帝天羽。 天策阁,智囊谋士。 药阁,掌管天庭神药天,主要职责炼丹、炼药、治伤、培育神药神草。 器阁,掌管天庭神器天,主要负责炼器、开矿。 武阁,天庭主要武力部门,分为金木水火土等部。 天机阁,情报机构,分为天罗地网两大机构。 天杀阁:刺杀机构。 天政阁,负责天庭内政。 天兵阁,掌管天庭军队。欢迎来到轮回列车,这里是选拔轮回者的养蛊场 ,在这里我们将进行轮回者的选拔,至于选拔方式,你们将通关一个个试验世界。成功者你们将获得一切你们想要的:寿命、力量、健康、货币资源、以及一切你们能想象到的、不能想象到的。失败者:抹杀!啊啊啊啊! 这不是驾校!丧尸都冲脸上了,还自检打火,你是怕你过不了科目二嘛你是?! ——简洁 法斯特从霍格沃兹毕业后与自己的好友鲍克斯、兰一起探险魔法世界。当一行三人探索魔法古墓时,兰受到了护陵诅咒。这种诅咒非常残忍,当被诅咒人三十岁时就会自燃化为灰烬。鲍克斯和法斯特走遍大街小巷,黑林深处却都无功而返,唯有求助魔法部的帮助,故事便从这里开始……入赘女婿如何受气难当,人生一路走向巅峰杨凌两耳不闻窗外事,喜欢活在自己的世界,不想招惹外面的是是非非。 自从准岳父被人一句‘刀下留人’所伤后,开启了无奈的征战之旅。 (本书没有金手指,没有系统,非无敌,一切都靠自己。) 鲜血淋漓的战场,神秘的第三方势力,未完待续的故事…… 意外穿越进游戏世界的楚昱和盛追,在诧异和激动下开启了他们的游戏人生。 在不断和域界人洛羽的相处下,他们逐渐发现了这个世界里和游戏的不同之处,剧情中的漏洞究竟是bug还是阴谋? 友情、立场。 信仰的冲突下,他们的冒险究竟会如何发展呢。 陈凡在打开天门时,意外发现自己天门旁的金色大门,让他没有想到的是,这大门居然可以通往异界。 更神奇的是,高端战力的异界,学习的仙文居然是中文,本来想教学生们武道的陈凡,因为太弱只得选择教文。 然后为了这些孩子的文化水平,只得将原世界的教学方法搬到了异界,时常占用武道课,最终陈凡活成了自己以前讨厌的样子。
天骄变 魔道巅峰之天似红霞岸 惊悚游戏:我把厉鬼玩坏了 末日诛仙 香水与星河 桃源小天师 公子饶命 k小队 全球第一人 龙陨时代 关于我成为反派这件事 别具一格 开局被判诛九族,贵妃娘娘 全民震惊,你管这叫贫困户? 参见吾王 高武:我能查看人生剧本 年少时的我们 沈江 穿越秦朝之始皇是我兄弟 末世避难所,打造地下城 我的前半生前传 北京天气晕 江油北未来一周天气 金子山天气2345 百度10天四川江油天气 北京天气晕 广东潮汕南澳天气预报 金子山一周天气预报 江油大康天气 广东潮汕南澳天气预报 江油市历史天气 张掖11月天气 张掖11月天气 汕头南澳岛 天气 江油北未来一周天气 武山2017历史天气预报 重庆天气7天预报 连山一周天气 关于云和天气 文山州3月份天气情况 武山2017历史天气预报 杭州的天气温度是多少 西安天气7月23日 文山州3月份天气情况 关于金子山天气预报 江油大康天气 汕头南澳岛天气预报一周 关于云和天气 文山州3月份天气情况 文山四月天气预报 关于云和天气 百度10天四川江油天气 杭州的天气温度是多少 重庆近三天天气 武山2017历史天气预报 汕头南澳岛 天气 重庆天气7天预报 重庆3天天气 金子山一周天气预报 汕头南澳岛 天气 重庆3天天气 重庆天气7天预报 江油市30天天气预报 上海5月3日-7日天气 连山一周天气 广东金子山天气 杭州的天气温度是多少 张掖11月天气 重庆天气7天预报 汕头南澳岛天气预报一周 江油未来一月天气预报 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 社恐,请问你们还招总裁吗 狗磊的异世界生活 天机十八策 那时我等年少轻狂 我应该是正义的超人吧? 百家乐官网 澳门葡京官网 葡京官网 百家乐官网 万利游戏官网 江油未来一月天气预报 江油市历史天气 华南海天气 江油天气预报30tian 金子山一周天气预报 广东潮汕南澳天气预报 连山一周天气 关于金子山天气预报 天气里的体感度是什么 关于金子山天气预报 武山2017历史天气预报 广东金子山天气 文山州3月份天气情况 江油大康天气 北京天气晕 武山2017历史天气预报 广东潮汕南澳天气预报 北京天气晕 关于金子山天气预报 关于云和天气 汕头南澳岛天气预报一周 重庆天气7天预报 汕头南澳岛天气预报一周 广东潮汕南澳天气预报 天水市十月份天气 金子山一周天气预报 江油市30天天气预报 连山一周天气 重庆3天天气 上海5月3日-7日天气