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
苦菜花电影 下载微电影寡妇影评印度电影 背叛周里京主演的电影水上回光 电影苦菜花电影 下载最佳的电影印度电影 背叛九龙佩电影下载2014年经典电影美国电影天皇苦菜花电影 下载闰年电影影评美国电影天皇印度电影 背叛隔离电影剧情分析电影失事剧情水上回光 电影水上回光 电影坏男孩电影完整版生日快乐 微电影夜之幻影 电影九龙佩电影下载闺蜜电影吻戏阿克谢库马尔的电影外国小孩子街舞励志微电影周里京主演的电影宋佳电影全部电影坏男孩电影完整版人偶武侠电影那一天,他含泪死去,那一天,他重新归来【热血奶爸+超级神豪系统+幽默沙雕】   “张昊,我生了你的宝宝,三胞胎!”   “啥?”   看着眼前的美女校花,张昊满脸震惊!   这时……   “叮~恭喜宿主激活超级奶爸系统!”   “叮~给宝宝做饭,奖励超级厨艺!”   “叮~给宝宝唱哥,奖励超级音乐天赋!”   “叮~跟老婆造娃,奖励一百亿!”   张昊:什么情况?我咋蒙圈了呢???“鄂州动而天下乱,鄂州安而天下定!”在中华上下五千年的历史车轮中,鄂州一直扮演着举足轻重的角色。 从上古时期黄帝与蚩尤之战中的九黎部落的站位,导致蚩尤战败身首异处;到禹分九洲的三苗族与夏王朝数百年的对峙,最终两个部落在相爱相杀中远走中原;再到商王朝勋贵之首的鄂候,为救九侯而犯颜强谏,结果遭到商纣王脯刑,商王朝也因此尽失天下;再到与西周硬刚三百余年的鄂侯驭方,其“振臂一呼,应者云集”,与淮夷东夷联军,一直打到东都成周(今洛阳市东白马寺一带)附近,然后两方互相消耗中磕死了对方,直到现在鄂地人们还有“不服周”一说。网安圈的菜鸡一枚,没事写点内容造福群友。楚江空晚。怅离群万里,恍然惊散。自顾影、欲下寒塘,正沙净草枯,水平天远。写不成书,只寄得、相思一点。料因循误了,残毡拥雪,故人心眼。——《解连环·孤雁》 身负家族血仇的燕孤鸿持三尺长剑,快意恩仇游戏江湖。强者如何?皇室亦如何?剑无形刀无心,何惧!本人是新人作者,有什么写的不对的地方望各位读者多多包涵“什么?原来我是恶魔?” 十六岁那天,‘穿越者’阎墨终于等来了属于自己的灿烂。 ------------------------------ ‘普通人类’加入恶魔学园学习成为恶魔的故事,大概会涉及入间同学入魔了,家庭教师,猎人。天魁元1840年,一片繁华的人类社会,遭受到了前所未有的外来文明的侵占。世界各地的人类都被变异者袭击,人们都称他们为“毁魁人”。更为之胆颤心惊的,是这些毁魁人有着比人类还要高级的智慧。毁魁人占领了地球,人类文明危在旦夕......僧非僧,人非人。爱与恨,痴与怨,纵跨两千年,一个与众不同的江湖故事!穿越到了一个全新的异世界, 在这个剑与魔法交织的世界里, 主角吕越点燃自己的斗气, 拳打异族,脚踢鬼神, 在血与火的试炼中, 吕越逐渐走向无敌
重生之缘来在韶华 葬花之月色尽 看守所笔记 酆都印 银河系大战前先流浪 帝剑:问天 长临渊 华夏英雄觉醒之拘魂遣将 天御族1统筹 铁血狂徒之周姐是我妻 霍格沃茨的抽卡欧皇 盘龙斗 聂都后裔 魔女图鉴 谁是少年,谁不狂 我身独仙 恐怖复苏:我以肉身横推诸天! 超凡:我体内寄居着邪神 乱灵纪 风雪纵亭茗 外国小孩子街舞励志微电影 隔离电影剧情分析 感人的国产电影 水上回光 电影 微电影寡妇影评 宋佳电影全部电影 感人的国产电影 别墅魅影电影 七条命电影完整版 闰年电影影评 电影坏老师结局 电影坏老师结局 闺蜜电影吻戏 隔离电影剧情分析 苦菜花电影 下载 阿克谢库马尔的电影 陶大宇演的一部电影好像为了生存什么都干得 外国小孩子街舞励志微电影 励志舞蹈电影 印度电影 背叛 隔离电影剧情分析 印度电影 背叛 励志舞蹈电影 夜之幻影 电影 2014年经典电影 九龙滩电影 外国小孩子街舞励志微电影 励志舞蹈电影 励志舞蹈电影 七条命电影完整版 水上回光 电影 坏女人电影完整版 周里京主演的电影 苦菜花电影 下载 闺蜜电影吻戏 阿克谢库马尔的电影 周里京主演的电影 感人的国产电影 闺蜜电影吻戏 坏警察电影 阿克谢库马尔的电影 别墅魅影电影 坏男孩电影完整版 陶大宇演的一部电影好像为了生存什么都干得 美国电影天皇 坏女人电影完整版 电影坏老师结局 阿克谢库马尔的电影 九龙滩电影 电影失事剧情 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 海贼王:海贼图鉴藏尽天下 寞路血郎 至尊小仙农 漫威:从金刚狼开始 戚明 百度 百度 百度 百度 百度 闰年电影影评 人偶武侠电影 电影坏老师结局 生日快乐 微电影 宋佳电影全部电影 夜之幻影 电影 别墅魅影电影 印度电影 背叛 坏女人电影完整版 坏男孩电影完整版 人偶武侠电影 阿克谢库马尔的电影 生日快乐 微电影 生日快乐 微电影 电影失事剧情 感人的国产电影 别墅魅影电影 人偶武侠电影 隔离电影剧情分析 九龙佩电影下载 七条命电影完整版 水上回光 电影 别墅魅影电影 微电影寡妇影评 美国电影天皇 九龙滩电影 人偶武侠电影 阿克谢库马尔的电影 生日快乐 微电影 生日快乐 微电影 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网