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
宝宝五个月月经不正常吗宝宝有脓痰 鼻子痒宝宝胃比肚子鼓宝宝眼白血丝宝宝眼睛结膜炎用什么眼药水宝宝为什么会有兔唇八个月宝宝不停啼哭宝宝胃比肚子鼓八个月宝宝换奶粉拉肚子怎么办宝宝衣服能用锦纶吗宝宝一周半吃手宝宝胃比肚子鼓八个月的宝宝会说什么宝宝腋窝起疙瘩宝宝五个月月经不正常吗宝宝衣服能用锦纶吗八个月宝宝肠炎喝什么宝宝羊肉汤怎么做好吃宝宝羊肉汤怎么做好吃宝宝周岁生日怎么计算宝宝下面出牙了怎么办啊宝宝羊肉汤怎么做好吃八个月宝宝换奶粉拉肚子怎么办宝宝怎么吃草菇吗宝宝眼睛结膜炎用什么眼药水宝宝有脓痰 鼻子痒宝宝眼白血丝宝宝怎么吃草菇吗宝宝周岁生日怎么计算八个月的宝宝会说什么“气味是人最长久的回忆。” 因实验事故穿越到调香师尤里安身上的张诺亚,悲哀地发现自己两世为人,两世没有嗅觉,还两世都是调香师! 穿越来到北欧神话背景的异世界大陆,异彩纷呈的各类魔法,近代风格的品牌商业,狂战士、圣剑骑士、炼金术、白魔法......还有对尤里安最重要的气味图书馆系统。 【气味图书馆设定:宿主可用经验值,在气味图书馆点亮气味图鉴哦!圆你一个重获嗅觉的梦想哦!】 气味图书馆给了年轻调香师新生的机会,但它似乎并不总是那么驯良。 系统对宿主似乎有着什么不可告人的秘密,在不断的任务布置中,慢慢引导尤里安走向另一个极端。 ————流浪调香师尤里安,从零起步,带着前世丰富的理论知识,一点一滴收集气味图鉴,调配各种经典香水,成立属于自己的“温斯顿1027”品牌,成为教廷英灵殿的首席调香师。 剑与魔法,品牌商战,诡计阳谋。自身的隐患,流星般的爱情......一切都会消散。 “在这里只有气味长存。”月高悬于空,星不见其影。 沉眠的暴君从历史中苏醒,漆黑的双翼划过破晓的黎明;巍峨古堡跨越了尘封的的记忆,矗立在洛尔维亚的群山之巅。 当头戴王冠的公主睁开双眼,从死亡归来的旅人重新握住剑柄—— 国王湖的水面不再平静,却依旧深不见底。神魔复苏,天地动乱。天域?牢笼?于凡夫眼中的天人,或许才是最卑微的人族。我明征天人古族后裔,吞吐天地灵力,淬炼肉身宝藏,血宝无灵源,其刃当无敌。谁语凡夫堪蝼蚁?剑下神魔只称臣。该主要讲述的是从初中到高中发生的一些事情,包括中考、高考之后或者是之前发生的事;不愉快、令人震惊、令人愤恨;除此之外还有让人感动、让人流泪。在青春的奋斗之时为我们需要付出比别人更多的汗水与泪水,我们为之拼搏,只是为了更好的未来。 世事一翻手,诗旧三折肱。 江湖多白雨,魂梦杂青灯。 都说世事无相,为何人要执着?得之,我幸,不得便是我命?叶枫若是没有历上世那彻骨痛苦,可能还真就做个闲人,一张琴,一壶酒,一溪云。可是这次他想做个强者,不为其他只为守护。 这是关于一个稳健的强者,守护身边人的故事。嗯,是的,很稳健~混沌初开,人族悲惨命运。世间大圣绝世双骄引领人族走向兴旺。王昭,一个生活在普通城市的普通人。 一觉醒来穿越到原神世界,这时候的时间段是—魔神战争期间。 淦,别的穿越者刚传送就有外挂加系统,自己怎么什么都没有? 他尝试呼叫系统,这一叫,热闹了整个魔神战争。 “诸天万界无敌系统,以后姐罩你。” 麻了,王昭人已经麻了。 之后,他靠着这个“诸天万界无敌系统”,横扫异界,一步步成为世界之主。 注:本文的主角是有后宫的(大概?),看不下去的小伙伴对不住啦!混沌初开,孕分时空; 天地恒之,乃成世界。 三千小为中,三千中为大; 三千大世界,方得一宇宙; 宇宙无垠,混沌之始。 …… 天书录仙魔,地书鉴人妖; 无量诸世法,乾坤万物宝。 ...... 凡人问仙,谱写天地记忆复苏,在外界大陆重新修炼,寻找当年的死。随着实力越来越强,真相便离我越来越近。犯我绝,吞天地,一生下来只为吞噬天道,自我化道。空气中竟含有限制生物进化的慢性病毒?!大气层是阻碍生物吸收宇宙能量的囚笼?!有外星文明针对地球?!2222年的2月22日,经过几百年的研究,地球人类研究所发表了一个个令人三观彻底颠覆的结论。在所有人的惶恐不安中,几百年后,研究人员发现空气中的病毒慢慢消失了,从那以后,一切好像都变得不一样了……
无敌县令,断案就变强! 长生入微 重生之血光冲天 凰族,唯一神子 荡世九歌 天元梦冢 惊世斩天 穿越异界魔王 入赘后,娘子对我太好怎么 成长崎岖路 等待:慢慢苟活 转生后变成自动贩卖机 众与世界 落尽天因 盅哥的强无敌 我有一个宗主系统 玄灵石 智能迷失 千乱 穿越还是穿刺 宝宝有一颗什么心 宝宝阴茎上有鼓包 八个月宝宝钙多少正常 宝宝腋窝起疙瘩 宝宝有一颗什么心 宝宝整夜不吃奶 回奶了 八个月宝宝钙多少正常 八个月的宝宝会说什么 宝宝怎么吃草菇吗 41周宝宝不发动怎么办 宝宝下巴长小泡泡怎么办 宝宝下巴长小泡泡怎么办 吵架 宝宝 宝宝阴茎上有鼓包 宝宝五个月月经不正常吗 宝宝腋窝起疙瘩 八个月宝宝换奶粉拉肚子怎么办 宝宝怎么吃草菇吗 宝宝夏天腿上长红点 宝宝洗澡充气浴盆好吗 宝宝阴茎上有鼓包 宝宝眼白血丝 宝宝有脓痰 鼻子痒 宝宝一周岁之后怎么吃 八个月宝宝一哭就吐 吵架 宝宝 宝宝怎么吃草菇吗 宝宝有脓痰 鼻子痒 宝宝夏天腿上长红点 宝宝怎么吃草菇吗 宝宝腋窝起疙瘩 宝宝衣服能用锦纶吗 宝宝眼睛结膜炎用什么眼药水 宝宝五个月月经不正常吗 宝宝周岁生日怎么计算 宝宝腋窝起疙瘩 宝宝眼睛结膜炎用什么眼药水 八个月宝宝钙多少正常 吵架 宝宝 宝宝眼白血丝 宝宝羊肉汤怎么做好吃 41周宝宝不发动怎么办 宝宝胃比肚子鼓 八个月宝宝换奶粉拉肚子怎么办 宝宝一周岁之后怎么吃 宝宝阴茎上有鼓包 宝宝下巴长小泡泡怎么办 宝宝羊肉汤怎么做好吃 吵架 宝宝 八个月宝宝第一次开荤 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 青玉仙石 无法抗拒的永恒 超级小渔民 一个鬼的归宿 精灵之暗黑潮流 快连下载 亚星管理平台 亚星官网 快连下载 亚星管理平台 八个月宝宝一哭就吐 宝宝洗澡充气浴盆好吗 八个月宝宝换奶粉拉肚子怎么办 八个月宝宝换奶粉拉肚子怎么办 宝宝羊肉汤怎么做好吃 宝宝眼睛结膜炎用什么眼药水 宝宝为什么会有兔唇 宝宝衣服能用锦纶吗 宝宝羊肉汤怎么做好吃 八个月宝宝肠炎喝什么 宝宝下面出牙了怎么办啊 宝宝五个月月经不正常吗 宝宝一周半吃手 八个月宝宝换奶粉拉肚子怎么办 宝宝眼白血丝 宝宝有脓痰 鼻子痒 宝宝胃比肚子鼓 宝宝胃比肚子鼓 八个月宝宝第一次开荤 八个月宝宝肠炎喝什么 宝宝洗澡充气浴盆好吗 宝宝眼白血丝 吵架 宝宝 宝宝胃比肚子鼓 宝宝眼睛结膜炎用什么眼药水 宝宝腋窝起疙瘩 八个月宝宝一哭就吐 宝宝夏天腿上长红点 吵架 宝宝 八个月宝宝换奶粉拉肚子怎么办