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
建行信用卡六千的有年费吗信用卡欠款未还判刑一万的信用卡能透支多少淄川交行信用卡沧州市办信用卡建行信用卡六千的有年费吗黄石招行信用卡优惠活动一万的信用卡能透支多少广发信用卡提不了额度怎么自己刷信用卡没有工作如何申请信用卡一万的信用卡能透支多少信用卡逾期欠款五千元律师打电话没有工作如何申请信用卡中信银行信用卡逾期三个月八千怎么自己刷信用卡信用卡有1个月透支超过90天建行信用卡 提前还款 取现建行信用卡 提前还款 取现网上申办信用卡银行卡多长时间信用卡逾期还款3次建行信用卡 提前还款 取现广发信用卡提不了额度信用卡一个月可以刷几次沧州市办信用卡工商信用卡能透支吗信用卡每个月都要透支麽信用卡一个月可以刷几次网上申办信用卡银行卡多长时间信用卡逾期欠款五千元律师打电话观天行,识阴阳,纳五行,万化生乎身,守本性。虽历经万难亦不忘福泽一方。且观天珩烟雨,守己之心,从容而行。虽然南宫基的成长有点慢,但这些都是他必须有的经历,要不如何能在各种经历和磨难中成长,又如何超脱,各位看官请耐心与南宫少爷一起经历,让经历成为财富,成功就在不远的地方等着你。 死亡之后,异界重生,完成夙愿,成就空古道尊之位,名震诸天。这个世界文道为尊,文人掌文箓,修文气,开文宫。 九品开窍文箓,一目十行,身轻体健。 八品修身文箓,文字加身,如有神助。 七品仁者文箓…… “诗词歌赋,笔墨丹青,棋艺话本这些你都懂?” “略懂略懂。” “都懂一点也行。” “是亿点点……” 官居一品,权倾朝野? 封王拜相,永享荣华? 不不不,身怀国家图书馆全部资料的李长安,无奈接受了,世人把他名字刻进圣庙的事实。 塑圣魂,觅长生,热血前行,登仙道!法外狂徒张三在被执行死刑后无意穿越异能异界,在这个世界张三还能做回那个法外狂徒吗?在这个异能世界,张三又该何去何从?故事梗概:在遥远的飞禽岛,有一个孤独的老人过着简单而清苦的日子,没有人知道他就是曾经在江湖兵器谱上排名第一被誉为天下第一攻击手的专杀厚势10段。后来在一次江湖排名大赛上他被排名第二的人称缓气大师的缓八气劫9段暗算失去了天下第一攻击手的称号,从此,缓气大师独霸黑白江湖,而专杀厚势10段却神秘消失了….… 多年以后遥远的飞禽岛诞生了不败少年一 小飞侠李可可,他能为自己的师傅专杀厚势10段完美复仇么?而且必须是以屠龙的方式,他都经历了什么?敬请期待…… 生逢乱世,不求渡尽苍生,只求命数己定。 . 一生坎坷,只为与天争朝夕之命; 一生如画,水墨飘香自乱世情仇; . 幽火熊熊焚芸芸之众生,风雷阵阵破无间之魍魉;蓝星位置暴露,万族窥视,毫无征兆的进入了星际时代。 魔窟降临,巨兽入侵,神灵坐镇其他国家,唯大夏无神庇佑! 在这个热武崩塌的绝望纪元,大夏全民参战,青壮皆赴死。 唯独夏薪,及冠之年,身强力壮,却选择和一群老弱病残一起,留在后方锻剑打铁…… 逃兵,懦夫,大夏之耻,全网怒骂,众叛亲离! …… 夜幕降临,一道遮天蔽日的虚影映照整个大夏。 “吾名传道者,穿越时空,对话先贤,传尔大道,以御强敌!” 对话燧人氏,见证第一缕文明之火诞生,顿悟薪火大道! 对话神农氏,见证神农尝百草,顿悟炼丹大道! 对话大禹,见证禹刊九州,凝聚气运九鼎,镇守国境…… …… 某一日,夏薪无事,身躯盘坐大夏上空,一人一剑。 诸神见状,纷纷退避。 “前方大夏,万族噩梦!!”一名普通职业经理人,意外魂穿到民国,成为一名军统特工,没有金手指,凭借前世的信息,依靠自己的知识并不断地学习、成长,在风云变幻的时代中为国家,为民族贡献自己的力量,并创造了一段段精彩的特工传奇……重生即传奇 苦乐童年后,巧合之下有了不同的身份 身怀高能的他更是如虎添翼 善与恶,一念间 向善而行 终究书写炫丽的传奇人生……
我当神棍那些年 都市之逍遥小神医! 末日节度使 逆袭修炼成仙 神中狂龙 三元开泰 进击的野鸽 万兽怪谈之羊女 我是战神赘婿!你确定 灵气复苏:从吞噬灵剑开始 寄心生梦 郭十二传 诡异世界:我有武道修改器 玄武奇侠传 黑白暗涌 娱乐超级奶爸 乾灵九霄2 社恐求生 第二十三号病床 全球映射:开局我是满级大佬 信用卡那家银行比较好 VIP柜台申请信用卡成功率 信用卡有1个月透支超过90天 沧州市办信用卡 信用卡那家银行比较好 广发信用卡已预期180天 信用卡有1个月透支超过90天 怎么刷信用卡积分 工商信用卡能透支吗 信用卡和借记卡在卡上能看出来吗 广发信用卡提不了额度 沧州银行信用卡网上申请 申请信用卡 没用 卡丢了 VIP柜台申请信用卡成功率 建行信用卡六千的有年费吗 沧州市办信用卡 信用卡每月还款多少 工商信用卡能透支吗 信用卡借人要注意 一万的信用卡能透支多少 VIP柜台申请信用卡成功率 中信银行信用卡逾期三个月八千 信用卡欠款未还判刑 没有工作如何申请信用卡 怎么自己刷信用卡 申请信用卡 没用 卡丢了 工商信用卡能透支吗 信用卡欠款未还判刑 信用卡借人要注意 工商信用卡能透支吗 沧州市办信用卡 广发银行信用卡同城跨行取款 淄川交行信用卡 建行信用卡六千的有年费吗 信用卡一个月可以刷几次 沧州市办信用卡 淄川交行信用卡 信用卡有1个月透支超过90天 申请信用卡 没用 卡丢了 中信银行信用卡逾期三个月八千 信用卡每个月都要透支麽 信用卡和借记卡在卡上能看出来吗 宁波 信用卡 信用卡每月还款多少 没有工作如何申请信用卡 VIP柜台申请信用卡成功率 沧州银行信用卡网上申请 信用卡每个月都要透支麽 申请信用卡 没用 卡丢了 黄石招行信用卡优惠活动 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 四个游戏 辉光之界 深渊之口 大秦:深宫签到十八年,出世陆地神仙 一剑封情 葡京官网 快连下载 欧博官网 葡京官网 皇冠登3出租 怎么自己刷信用卡 黄石招行信用卡优惠活动 信用卡一个月可以刷几次 中信银行信用卡逾期三个月八千 信用卡借人要注意 网上申办信用卡银行卡多长时间 沧州银行信用卡网上申请 淄川交行信用卡 广发信用卡已预期180天 怎么刷信用卡积分 怎么自己刷信用卡 沧州市办信用卡 建行信用卡 提前还款 取现 一万的信用卡能透支多少 淄川交行信用卡 宁波 信用卡 VIP柜台申请信用卡成功率 中行信用卡逾期三个月会怎么样 广发信用卡已预期180天 一万的信用卡能透支多少 信用卡逾期欠款五千元律师打电话 申请信用卡 没用 卡丢了 信用卡每月还款多少 淄川交行信用卡 工商信用卡能透支吗 怎么自己刷信用卡 怎么自己刷信用卡 信用卡那家银行比较好 信用卡那家银行比较好 广发信用卡提不了额度