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
阿元烧鹅电话文明路故宫票务电话图里河中通电话峰峰好伦哥自助餐电话哈尔滨票务中心电话阿元烧鹅电话文明路凌源丽都名品电话图里河中通电话天津市美亚影城电话号码深圳香蜜车管所电话宜宾江安夏橙电话图里河中通电话延吉联通电话开头宜宾江安夏橙电话澳门外港码头联系电话深圳香蜜车管所电话屏南旧车站电话铜梁腊梅园 电话铜梁腊梅园 电话民生银行乐天世纪城电话鸡西到长春客运电话铜梁腊梅园 电话天津市美亚影城电话号码延吉市盒饭电话中山市国土局电话北京到辽阳客车电话是多少钱中山市国土局电话延吉市盒饭电话民生银行乐天世纪城电话延吉联通电话开头没有昭昭天命,仅有一具不屈的铮铮傲骨。 没有炼神逆天,仅有一曲无悔的荡世壮歌。 沧海横流,生灵涂炭。灾厄接踵而至,上古都不曾有之的空前浩劫降临,数度末日之下,难见曙光。 九霄之巅,天柱高耸,圣殿笼云。护佑众生,恩泽万灵。 “但倘若柱毁殿塌,正道不存,我就是这撑持乾坤的天柱。上达天听,下至黎民。特立誓于浩然天地,以身魂七尺,替苍生挡下这万丈波澜。” “没必要这么严肃吧,”她在他背后撅着嘴,吐掉一颗瓜子皮,“说得好像要万劫不复一样。今天晚上吃我的秘制茄子糕好啦,不削皮哦。” 柔软的衣袂飘动,在塌陷的穹窿下,是战火柔情的希望。 山海玄黄天浩渺,潭渊滚荡盘龙峭。 战血随波八万里,乘风一跃上九霄。 浪洗青锋开武道,策隐玄图有神韬。 天疆峥嵘邪孽止,明玥千古拭云朝。 【欢迎各位书虫读者入坑,坚持日更,同时求各种推荐票订阅收藏鲜花红包,读者们的支持是更新的最大动力,谢谢(~ ̄▽ ̄)~】刘文明遭遇失恋后,奋发进取,带领乡亲们脱穷致富传闻大禹每逢七百年将遇巨变,而江山的传承将要落到萧正的肩膀上,仁帝为摆脱魔咒,传他大禹帝王阁无上经文。而后上青云峰入玲珑观,得‘机缘道人’点拨,心智也变得成熟。待到一切安排就绪,美人在怀,情丝渐深。朝堂和江湖的纷乱也逐渐露出了端倪......故事发生在2135年,一次偶然的考古发现,让一种丧尸病毒暴露人间。林少白是一家生物科技公司的员工,在一次团建过程中,病毒在满载公司员工的客机上传播,客机坠毁,林少白是唯一幸存者,但奇怪的是,所有遇难的员工都继续正常上班,而林少白却对空难毫无记忆。随后,病毒从实验室泄露,在一栋办公楼内传播,原本过着平凡生活的林少白,突然肩负起化解危机的使命。股市,是上帝留存在世间的最后一个伊甸园。 这个伊甸园,是圣人的天堂,凡人的地狱。 不管是圣人又或者是凡人,都被贪婪与恐惧所支配着。 稍不留神,便可能马失前蹄。 是驰骋在天堂里超凡入圣,还是在地狱里摸爬滚打,所有干系。 都寄于…… 指尖之上。 夏建独身混都市,历尽苦难,终成正果。摇身一变,他成了名符其实的大老板……简介 2021年,一种新型病毒扩散开来,将人变成了不会思考,只会吃人的怪物,人类正面对着空前的危机,社会遭受巨大变故。在嘈杂的魔都,上海,正处于大好年华的少男少女们(只是初二)如何在这个陌生而熟悉的社会中生存?面对自私、背叛、杀戮,他们会丧失生而为人的本性吗?一个月后的神秘无线电称可以让所有人得救,他们又该何去何从? “我不能死,我们都不能死,一个也不能少!”他背负着这样的使命,他必须利用这个力量,拯救所有人。镇物,也叫镇邪之物。在民间,镇物用于镇墓、镇宅等。 镇物用得好可以救人,而被心术不正的人利用,也能杀人于无形。妖吞三千界,帝陨傲世间。为她凡尘一坐三千载,起身回首凡尘,往长生。城市发生了大乱,惊吓,恐怖,杀人,城市到处是烟雾弥漫,。凡是国家领导级都不见了踪影,本以为是简单的讨论国家大事。却神秘的消失。所有人的记忆被磨除了记忆一般。没有人记得他们是谁。主人公兰成,突然从梦中醒来。一次车祸,让他偶然醒来。也只有他记得自己的父母,但是他们神秘消失了,全部都因一封信邀约。来往寂城。兰成找了这个城市1年,找到了,打开,大门才知道这是空城。当年父母到底发生了什么。。。
什么都能修的匠人 炼体十万层 太初有魔于道先 烟火世界 江湖:无奈扮虎吃猪 大秦:开局欠始皇百万黄金 阴阳怪术 银河之子小影 无敌太阳 永道超然 神作?这种游戏我有一堆 寂灭深处 修罗武神 铁血青州 别具一格 炼气无限 狗屁不通的琐碎 游戏世界之我是NPC 剑狂无酒 曙光之壤 海阳矿泉水送水电话 厦门安第仕电话400 屏南旧车站电话 哈尔滨票务中心电话 海阳矿泉水送水电话 胶州锦江之星电话号码 屏南旧车站电话 新郑红灯笼订台电话 北京到辽阳客车电话是多少钱 宁波美宴餐厅电话多少 河源万豪国际酒店电话 河源万豪国际酒店电话 运城园电话是多少 厦门安第仕电话400 阿元烧鹅电话文明路 哈尔滨票务中心电话 富阳天地农庄电话号码 北京到辽阳客车电话是多少钱 春申路车管所电话 图里河中通电话 厦门安第仕电话400 图里河中通电话 春申路车管所电话 铜梁腊梅园 电话 深圳香蜜车管所电话 运城园电话是多少 海阳矿泉水送水电话 故宫票务电话 春申路车管所电话 北京到辽阳客车电话是多少钱 哈尔滨票务中心电话 曲阜顺和大地影城电话 峰峰好伦哥自助餐电话 阿元烧鹅电话文明路 延吉市盒饭电话 中山市国土局电话 峰峰好伦哥自助餐电话 屏南旧车站电话 运城园电话是多少 澳门外港码头联系电话 中山市国土局电话 新郑红灯笼订台电话 濮阳到郑州电话 富阳天地农庄电话号码 宜宾江安夏橙电话 曲阜顺和大地影城电话 河源万豪国际酒店电话 中山市国土局电话 运城园电话是多少 连云港到哈尔滨汽车时刻表查询电话 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 末日星云 我在高武世界当倒爷 大周枭士 大国重器智能时代 再上昆仑 万利官网 皇冠登3出租 百家乐官网 万利官网 欧博官网 铜梁腊梅园 电话 曲阜顺和大地影城电话 宜宾江安夏橙电话 濮阳到郑州电话 河源万豪国际酒店电话 故宫票务电话 阿元烧鹅电话文明路 澳门外港码头联系电话 阿元烧鹅电话文明路 凌源丽都名品电话 图里河中通电话 哈尔滨票务中心电话 宁波美宴餐厅电话多少 运城园电话是多少 北京到辽阳客车电话是多少钱 宜宾江安夏橙电话 屏南旧车站电话 天津市美亚影城电话号码 富阳天地农庄电话号码 深圳香蜜车管所电话 民生银行乐天世纪城电话 澳门外港码头联系电话 天津市美亚影城电话号码 宁波美宴餐厅电话多少 凌源丽都名品电话 民生银行乐天世纪城电话 连云港到哈尔滨汽车时刻表查询电话 天津市美亚影城电话号码 延吉市盒饭电话 天津市美亚影城电话号码