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
电影小森林影评电影寻龙诀主演是谁乔治克鲁尼主演的电影黑骑士电影完整电影生命线主题电影小森林影评宠物猪猪电影乔治克鲁尼主演的电影末日危途差不多的电影羞涩妈妈在电影院有中国龙的电影电影小森林影评食人猪电影国语版有中国龙的电影乔治克鲁尼主演的电影羞涩妈妈在电影院山村姑娘2电影电影里独白时常配的纯音乐电影里独白时常配的纯音乐有死星的是什么电影有哪些刚上映的人类末日的电影瑞典电影应召女郎韩国有哪些虐心的电影前期的黄电影电影生命线主题反拖拉斯电影黑骑士电影完整近斯的黄电影有死星的是什么电影食人猪电影国语版全国各地都有叫龙凤镇的小地方,本书故事就是从主人公小时候生活的一个名为龙凤镇的地方开始,从小时候听说的不明飞行圆盘,到神秘莫测的玉鼎山,主人公在一个乡村小镇开始了一段无法解释的神奇之旅。。。中文名《弑星者:红桃皇后》 英文名《Starkiller:Hearts queen》(星际杀手:红心皇后) 2066年全世界经过长期流行病和核战争后总人口锐减至6亿,全球财富被资本家垄断并且统一为地球联邦政府后,人类贫富差距进一步扩大,资本阶级肆意挥霍地球资源,导致地球温室效应持续增加,环境被破坏已经不可逆,一系列恶果导致瘟疫和饥荒肆虐全世界,人类存亡已经危在旦夕....人类争夺资源被迫开始自相残杀,甚至作死发动全球核战争最终导致核污染破坏了整个地球的生态环境,人类在绝望中不断消亡 核冬天来临的废土世界,来自银河系中央掌管46个一级文明的银河帝国全面接管了地球,将地球划分为12区,人类受到了外星文明的压迫与奴役,然而,人类并未完全屈服,获得外星反抗军支持的地球天人组织&amp;lt;弑星者Starkiller&amp;gt;向银河帝国发起挑战...一场牵扯全宇宙战争浩劫全面爆发 世界黑暗的一角,禁锢万族的枷锁,缓缓揭开了.......无尽虚空,暗域缘起,幻境连绵,魂牵梦萦。如泡现盈破,似影隐现。通篇尽是浮想联翩,异想天开之事物,是略显温和的怪谈。内蕴玄机,有缘人或可勘破。一个二十一世纪的屌丝,刚完成一单新闻,猝死出租屋,还不知道有没有人收尸就来到了楚国,一个有着宋的憋屈明的铁血的平行空间还是异世界?总之不小心成了异性王唯一的子嗣,可能出场姿势不好,被人用锤子打出了的。周边都是贼兵蛮子鞑子,好在有后世的天线一条,不至于被古人玩死成为最惨穿越者,一路泡妞打蛮子,没事就种种地!当然是真的种地。这个世界上没有无缘无故的恨,也没有无缘无故的爱。人们活在一个阴冷的世界里,见不到光明,但亲情,友情,爱情赋予了这个世界另一份情感,这个世界被称作太阳系。由于核战争的爆发,大量的能量,摧毁了地表许多的城市但是一直在各种动植物体内沉睡的基因苏醒了。各种各位出现过的神奇动植物都出现。人类的生存空间越来越小……一夜之间,世界遭逢巨变,本是平民百姓的你,却意外拥有了罕见的异能......一家人的命运因为一个孩子就此改变!本作品已经废除,特此告知书友
千云落 凌晨电台 逍遥小捕快 第一帝国:第一纪元 失眠78小时 我有最强召唤系统 重整秩序 破天踪 俏无常 西域志异 游戏太菜,死后入游戏地狱 红墓碑 胜天半子之雄霸天下 十方天穹 废土穿越商 落尽天因 老槐树下的故事 不为人知的刑事集 诡计多端小女友 疯秀才,开局选亲白虎女 李尔王 1987 电影 好看的中国青春电影 小黄人卑鄙的我电影 有中国龙的电影 李尔王 1987 电影 前期的黄电影 韩国有哪些虐心的电影 食人猪电影国语版 近斯的黄电影 宠物猪猪电影 有哪些刚上映的人类末日的电影 末日危途差不多的电影 有死星的是什么电影 爱情转移电影完整版 乔治克鲁尼主演的电影 瑞典电影应召女郎 韩国有哪些虐心的电影 近斯的黄电影 电影育婴室朱一龙 深海狂鲨电影图片 好看的中国青春电影 黑骑士电影完整 反拖拉斯电影 有小电影吗 爱情转移电影完整版 有死星的是什么电影 近斯的黄电影 反拖拉斯电影 电影育婴室朱一龙 近斯的黄电影 瑞典电影应召女郎 好看的中国青春电影 电影生命线主题 深海狂鲨电影图片 电影扔掉白手套 瑞典电影应召女郎 电影生命线主题 韩国有哪些虐心的电影 有死星的是什么电影 电影生命线主题 瑞典电影应召女郎 红猪 电影日语 电影小森林影评 末日危途差不多的电影 瑞典电影应召女郎 有小电影吗 韩国有哪些虐心的电影 黑骑士电影完整 电影扔掉白手套 宠物猪猪电影 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 玄武门激变 麻神邵公子 圣元魔尊 傲娇师尊爱上我 秘法:从入门到贤者 亚星游戏官网 万利官网 欧博游戏官网 亚星游戏官网 葡京官网 有哪些刚上映的人类末日的电影 电影 红酒烩鸡 乔治克鲁尼主演的电影 电影小森林影评 电影育婴室朱一龙 爱情转移电影完整版 山村姑娘2电影 乔治克鲁尼主演的电影 近斯的黄电影 反拖拉斯电影 有中国龙的电影 李尔王 1987 电影 有死星的是什么电影 电影里独白时常配的纯音乐 有死星的是什么电影 小黄人卑鄙的我电影 电影小森林影评 羞涩妈妈在电影院 食人猪电影国语版 好看的中国青春电影 黑骑士电影完整 电影寻龙诀主演是谁 黑骑士电影完整 食人猪电影国语版 电影里独白时常配的纯音乐 黑骑士电影完整 小黄人卑鄙的我电影 电影里独白时常配的纯音乐 有小电影吗 山村姑娘2电影