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
孕妇腮腺炎会影响宝宝吗宝宝多大会翻身啊六个月的宝宝咳嗽吐奶八个月宝宝拉肚子吃点什么好十个月宝宝冬天照片孕妇腮腺炎会影响宝宝吗宝宝烫伤群六个月的宝宝咳嗽吐奶一个多月的宝宝是什么样子5岁宝宝还会长牙吗宝宝突然变得很兴奋六个月的宝宝咳嗽吐奶2岁宝宝脸被划伤该怎么办宝宝突然变得很兴奋宝宝6个月流鼻涕咳嗽怎么办5岁宝宝还会长牙吗宝宝支气管肺炎吃什么饭比较好内向宝宝特点十个月宝宝冬天照片一岁宝宝能吃几颗葡萄宝宝急疹为什么出内向宝宝特点一个多月的宝宝是什么样子可以带刚出生宝宝晒太阳吗角质层受损期间只能用宝宝霜了宝宝身上有几块皮破了一直不好角质层受损期间只能用宝宝霜了可以带刚出生宝宝晒太阳吗一岁宝宝能吃几颗葡萄2岁宝宝脸被划伤该怎么办末世来袭,废土之上,你我又要怎么生存!即将远赴海外留学的准大学生因意外流落荒岛,幸好碰到几个天涯沦落人,但岛上不止他们几个人,土著人,神秘公司跟他们组成三方势力。在脱离了文明之后,秩序还需要被遵守吗?邪恶的医疗实验到底是有失人权还是造福人类?每个人都做过一些不同寻常的梦,而梦中总会让人觉得毛骨悚然,以至于成为童年的阴影,为什么会出现这样的故事,也许在冥冥之中,有的人正身处其中,而你的灵魂却触碰到了另一个世界的黑暗,所以有的东西,应该睡醒了就忘记……此书摘自于人类的睡梦。 苍生涂涂,天下燎缭。 妖魔肆虐,正魔相争。 赵念之意外重生来到神秘莫测的修仙世界,成为一名修仙家族中的一员。 家族危机四伏,举步维艰,随时可能破灭。 在长辈的殷切希望和同辈的期望下,赵念之该如何带领自己的家族奋勇挣扎,逆流挣扎,一步步从寒门中崛起。 这是一个略微畸形的平行世界。 因为科技发展速度太快,商业和文艺的脚步完全跟不上进度。 导致这个世界大部分行业,都处于重技术,轻内容的情况。 而其中,尤其以游戏行业表现的最为明显! 没有电脑游戏,没有手机游戏,所有游戏都是VR的! 甚至连免费游戏都没有! 在这个世界,游戏是有钱人才有资格享受的昂贵物品。 “一个VR设备几十万,穷人就没资格玩游戏了?” 《传奇》《暗黑破坏神》《地下城与勇士》《梦幻西游》《魔兽世界》《英雄联盟》…… 陈风带着前世无数款经典游戏穿越而来,为无数普通玩家发声做事! 一步步走到世界之巅峰,被所有玩家和网友尊称为:游戏界的慈善家! 一言定生死,一语变乾坤。 三无吊丝史晓峰生俱“九格桃花命”,本无意沾惹红尘却左拥右抱,与林楚虹、周笑依、姜薇、池敏、钱玉萍、蔡小慧、吴非儿、桑小媚、山下杏奈、妮娜、迪亚娜、俞漫等诸多御姐、萝莉们,因缘相识,爱欲痴缠。 “桃花命”同时也给他带来了意想不到的陷阱和杀机,身陷绝境之时,一位神秘喇嘛赠予的神奇“天珠”给予了他第二次生命。 他能否终极逆天,最终扭转命运? 他能否携众美纵横四海,归隐桃源? 金戈铁马,驰骋沙场,断剑送人归,若有一天我立在苍穹之上,一定要主宰自己的命运绝世神王,重生一世,修无上逆天功法,有神王传承记忆,偶尔指点一下那所谓的天下大师,随手收几个天才做弟子跟班。 “缺少功法?那很简单!” “没有丹药?容易至极!” “问题是,你跟我混了么?” 这一世,叶星辰注定要踏上那巅峰至强者,以强凌云,以武逆天。一句话立意:主角受来到意外死亡游戏中....发现这里根本回不去.. . 只能通过开始游戏来不断积累游戏经验“爷就不信了,爷回不去!” 其实来到这游戏最好的办法就是适应它,不放弃。 简介 : 宋期年在吃完米线的时候无意间看到桌子上的广告单上绚丽的大字:&amp;quot;你有兴趣参加死亡游戏吗
缩小人类:微缩纪元 女总裁的神医兵王 特种兵之从炊事员开始崛起 美人小村医 不死道人 末日重生倒计时 逆仙成魔传 都市业余高手 最后一个剑修 原神:开局和胡桃签订契约 焚天古神 鬼道神君 渡元 道之外:破道之人 赤星降临 陆天仙帝 我修跪道 云间盗 为武林除害 仙剑三百 宝宝屁眼烂了高锰酸钾 5岁宝宝喝蛋白粉好吗 宝宝支气管肺炎吃什么饭比较好 十个月宝宝冬天照片 宝宝屁眼烂了高锰酸钾 6个月的宝宝能长时间坐着吗 宝宝支气管肺炎吃什么饭比较好 一个胚囊是不是就怀的个宝宝 宝宝身上有几块皮破了一直不好 有尖锐湿疣顺产后宝宝被传染了怎么办 宝宝什么时候能竖头 宝宝什么时候能竖头 怎样怀宝宝不长胎记 5岁宝宝喝蛋白粉好吗 孕妇腮腺炎会影响宝宝吗 十个月宝宝冬天照片 一岁半宝宝前胸皮肤为何像鸡皮 宝宝屁眼烂了高锰酸钾 1岁多宝宝口臭的原因和治疗方法 六个月的宝宝咳嗽吐奶 5岁宝宝喝蛋白粉好吗 六个月的宝宝咳嗽吐奶 1岁多宝宝口臭的原因和治疗方法 内向宝宝特点 5岁宝宝还会长牙吗 怎样怀宝宝不长胎记 宝宝屁眼烂了高锰酸钾 宝宝多大会翻身啊 1岁多宝宝口臭的原因和治疗方法 宝宝身上有几块皮破了一直不好 十个月宝宝冬天照片 两个月宝宝连咳4声 八个月宝宝拉肚子吃点什么好 孕妇腮腺炎会影响宝宝吗 可以带刚出生宝宝晒太阳吗 角质层受损期间只能用宝宝霜了 八个月宝宝拉肚子吃点什么好 宝宝支气管肺炎吃什么饭比较好 可以带刚出生宝宝晒太阳吗 宝宝6个月流鼻涕咳嗽怎么办 角质层受损期间只能用宝宝霜了 一个胚囊是不是就怀的个宝宝 宝宝腹部有块红色 一岁半宝宝前胸皮肤为何像鸡皮 宝宝突然变得很兴奋 两个月宝宝连咳4声 宝宝什么时候能竖头 角质层受损期间只能用宝宝霜了 怎样怀宝宝不长胎记 宝宝怎么睡不会鼻子呛奶图片 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 武登仙门 万世归来 视频:开局剧透大秦灭亡! 混沌魂力 大明:刚成首富,朱元璋求我当皇帝 亚星管理平台 万利游戏官网 万利官网 亚星管理平台 澳门葡京官网 1岁多宝宝口臭的原因和治疗方法 有尖锐湿疣顺产后宝宝被传染了怎么办 一岁宝宝能吃几颗葡萄 一岁宝宝能吃几颗葡萄 宝宝怎么睡不会鼻子呛奶图片 宝宝支气管肺炎吃什么饭比较好 一个胚囊是不是就怀的个宝宝 宝宝急疹为什么出 一岁半宝宝前胸皮肤为何像鸡皮 怎样怀宝宝不长胎记 宝宝6个月流鼻涕咳嗽怎么办 2岁宝宝脸被划伤该怎么办 一个多月的宝宝是什么样子 孕妇腮腺炎会影响宝宝吗 宝宝怎么睡不会鼻子呛奶图片 十个月宝宝冬天照片 有尖锐湿疣顺产后宝宝被传染了怎么办 一个胚囊是不是就怀的个宝宝 一岁宝宝能吃几颗葡萄 怎样怀宝宝不长胎记 宝宝烫伤群 宝宝怎么睡不会鼻子呛奶图片 5岁宝宝还会长牙吗 有尖锐湿疣顺产后宝宝被传染了怎么办 宝宝支气管肺炎吃什么饭比较好 宝宝什么时候能竖头 宝宝屁眼烂了高锰酸钾 角质层受损期间只能用宝宝霜了 5岁宝宝还会长牙吗 宝宝腹部有块红色