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
木樨园邮政局电话长沙海阔浴都联系电话郑州有一居电话西安917路公交车电话民治大地影院电话木樨园邮政局电话郑州薰衣草电话郑州有一居电话南顺城路送水电话深圳到枣庄的客车电话号码是多少钱高密市金孚隆超市电话木樨园邮政局电话大连市森林动物园电话高密市金孚隆超市电话郑州有一居电话深圳到枣庄的客车电话号码是多少钱荷坳日月潭农庄电话民治大地影院电话民治大地影院电话东海中天驾校大厅电话保亭县叫车电话仁怀市农村合医办电话南顺城路送水电话红谷滩长庚体检站电话塔韵路行政中心的电话潮汕机场安检电话西安917路公交车电话齐齐哈尔市客运站电话东海中天驾校大厅电话昆明市鲜花饼代理电话一觉醒来,叶良辰发现自己穿越到了危机重重的玄幻世界,成了一个未出世的胎儿。 还好他意外获得娘胎无敌系统,融合先天混元圣体,激活伴生神兽,并开出全属性武脉,得到功法武技无数,尚未出生就已经成为无敌……他出生更是不凡,惊动万族,他一人一剑,踏山河,破九霄,征战四方,成就无敌传说!意外穿越异世,别人成仙成佛,惨点的也是废物逆袭。 可是到了古二蛋这里,他却发现自己一点盼头也没有。 因为这家伙成为了一个骷髅兵!还是一个没有脑袋的下等残躯战损版骷髅兵! 生活不易,骷髅叹气,望着自己一两肉都没有的身体,古二蛋决定要逆袭给所有人看! “金手指系统!我要称王称霸!给我发威!” “收到宿主期盼,本系统已按照期盼进行修改,正式进化为骷髅领主系统,你可以通过收集资源来强化麾下士兵啦!而且是没有上限的强化呦!” “哦?这么厉害的吗!那么这种能力也能作用到我的身上对吧!” “…………” “对吧?” “…………” “对吧?!!!”天道之下的人,在追求着天道。只是,天道又是什么?人在追求什么?懦弱注定会被人所瞧不起,只有鼓起勇气才能登上人生的巅峰,不忘初心,为自己的理想而战,站起来吧少年!韩宁一觉醒来,发现自己穿越回到2002年,姚明刚刚登陆NBA的那一年。 本来想着去休斯顿火箭队应聘一个助理教练的职位,却没想到阴差阳错间直接接替鲁迪成为了球队的主教练。 火箭队,执教姚明,想想就很激动有没有?! 系统:别高兴的太早,给我带新秀姚明去夺冠! 韩宁:啥玩意?! 带2002年的火箭队夺冠?! 这可不是未来已经成为联盟顶级巨星的姚明,麦迪也还没来呢! 球队里还有一堆中看不中用的角色球员和垃圾合同。 要知道在这一年,奥尼尔还在巅峰期,在赛场上大杀四方。马刺队的三驾马车全部集齐。 这种地狱级难度,你让我率队夺冠?!张峰是一个大学生,还是良好市民,但是却进了监狱。 张峰想老老实实蹲个监狱,却学了武功还缓了刑。 张峰想复仇,却谈了个女朋友要结婚!这里有小说,也有散文、诗歌,汇聚成一部有复杂情感的365个夜晚故事,请您慢慢欣赏。 异世赌徒遇到当世疯子,风云变幻,看得他俩如何作死,在这人命如草芥的世界,如何为人类谋福祉呢?受师父嘱托而下山的金黄昏遇到了受爷爷嘱托在山下接故人的柳芝初。因为种种原因两人踏上了修行之路,一路上也遇到了很多志同道合的伙伴。为了那个最终的目标,即使长路漫漫,也要坚定不移地走下去。仙域女帝姬如霜惨遭暗算,自爆而亡。 机缘巧合一缕神魂转世投胎下界仙朝! 复仇大业未行,却发现隔壁居然还有一个男婴。 “哼,不过是长生路上的累赘罢了。” 可接下来,女帝却发现自己的这个弟弟有些变态。 放弃神药灵液,居然让她觉醒轮回道体! 摸摸自己,居然让她修为翻倍! …… 面对哥哥的无限宠爱,女帝则是羞红了脸。 “哼,雕虫小技!” “复仇当前,本帝怎么可能屈服于这个男人的施舍。” “嗯,神药真香!谢谢哥哥!“
道帝重生 云征九天 白骨巡天记 摩天行 孤枪点将台 朋友请自重 东荒纪元 我在人间斩妖的日子 我,范马孔子门徒,以德服人 极品透视小邪医 异魔, 窥夏 重生1996:胜者为王 黑白城之六城废墟 末日道士行 造梦无双花果山篇 凌云破空 魔鬼鱼海贼团 巨星奶爸从参加好声音开始 木鱼僧 南京江虞宾馆电话 高密市金孚隆超市电话 郑州薰衣草电话 西安917路公交车电话 保亭县叫车电话 潮汕机场安检电话 郑州薰衣草电话 深圳到枣庄的客车电话号码是多少钱 长沙海阔浴都联系电话 大连市森林动物园电话 杭州净慈寺咨询电话 杭州净慈寺咨询电话 红谷滩长庚体检站电话 深圳到枣庄的客车电话号码是多少钱 木樨园邮政局电话 塔韵路行政中心的电话 横岗新富华宾馆电话 潮汕机场安检电话 南京江虞宾馆电话 郑州有一居电话 广州客运段办公室电话号码 郑州有一居电话 南京江虞宾馆电话 仁怀市农村合医办电话 华科喻园小区物业电话 东圃旺阁休闲会所电话 潮汕机场安检电话 南京江虞宾馆电话 保亭县叫车电话 潮汕机场安检电话 民治大地影院电话 广州客运段办公室电话号码 西安917路公交车电话 木樨园邮政局电话 红谷滩长庚体检站电话 塔韵路行政中心的电话 西安917路公交车电话 谭溪山景区官方电话 红谷滩长庚体检站电话 广州省站汽车站电话 塔韵路行政中心的电话 昆明乐尚ktv电话多少 东海中天驾校大厅电话 横岗新富华宾馆电话 高密市金孚隆超市电话 广州客运段办公室电话号码 杭州净慈寺咨询电话 塔韵路行政中心的电话 东圃旺阁休闲会所电话 郑州薰衣草电话 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 我靠读书称霸诸子百家 蛇皇之异界纵横 唯求永生 我乃帝尊 人在娘胎:隔壁女帝想踹我出去 欧博官网 亚星官网 万利游戏官网 欧博官网 澳门葡京游戏官网 天全鹿鸣酒店电话 南京江虞宾馆电话 深圳到枣庄的客车电话号码是多少钱 昆明市鲜花饼代理电话 木樨园邮政局电话 潮汕机场安检电话 南京江虞宾馆电话 民治大地影院电话 潮汕机场安检电话 红谷滩长庚体检站电话 西安917路公交车电话 红谷滩长庚体检站电话 谭溪山景区官方电话 东海中天驾校大厅电话 广州客运段办公室电话号码 华科喻园小区物业电话 深圳到枣庄的客车电话号码是多少钱 郑州有一居电话 保亭县叫车电话 广州省站汽车站电话 华科喻园小区物业电话 塔韵路行政中心的电话 广州省站汽车站电话 荷坳日月潭农庄电话 西安917路公交车电话 仁怀市农村合医办电话 郑州薰衣草电话 高密市金孚隆超市电话 红谷滩长庚体检站电话 深圳到枣庄的客车电话号码是多少钱