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
香港电话卡显示龙悦国际回龙观电话铜山区派出所电话电话节是在什么时候烟台到北京高铁电话是多少钱一个月香港电话卡显示top花园道店电话多少钱铜山区派出所电话日本如何租电话号码前埔西社区电话阳朔花田电话铜山区派出所电话武汉到郑州大巴车电话多少阳朔花田电话西安楠林酒店电话前埔西社区电话高铁售后电话号码江苏省无锡市东降镇圆通电话烟台到北京高铁电话是多少钱一个月太原汽车总站电话多少时间河东区商务酒店地址电话号码江苏省无锡市东降镇圆通电话日本如何租电话号码蒲城美如家的电话平顺宾馆电话宁德寿宁车站电话平顺宾馆电话蒲城美如家的电话太原汽车总站电话多少时间武汉到郑州大巴车电话多少【洪荒封神+系统+爽文+热血+成圣】 叶晨穿越洪荒世界六百多年,应系统要求,成为历代人皇之师,但始终无法激活系统! 封神杀劫起,十绝阵将破,大商面临灭国,人皇帝辛纣王请求叶晨出山! 叶晨答应请求,终于成功激活神级选择系统! “叮,宿主身为人皇之师,理应为大商作出贡献,现在发布主线任务——拯救大商于危难之际!” “叮,检测到十绝阵百日内将被破,大商国力损耗过半,请宿主作出选择!” “选择一:大商天威不容轻辱,亲自前往岐山,阻止西岐叛军,奖励先天杀阵一座!” “选择二:大商国灭不关我事,苟在农夫山,坐看朝歌失陷,扣除寿命三百年!” 毫不犹豫,叶晨选择带着纣王帝辛出征西岐! 我有一座先天杀阵,请诸圣入阵!修炼一途,一切随缘。张宇飞,草根出生,却有强者之心,一步步成为人界最强者,最终,斩断祸害人界的异域入口,拯救苍生!叶辰生于诸神黄昏时代,神格散落大地,人人皆可成为神! 本是天之骄子的叶辰,却因自身神界内的信徒皆是无法修炼的人类,从而惨遭退学…… 幸好,他还觉醒了超级科技系统! 于是,当所有人都在钻研各种魔法,信奉个人之勇的时候。 他的信徒却凭借科技的飞速发展,创造了机械飞升的道路。 二向箔、光速飞船、反物质导弹、基因进化、人工智能、计算机破解一切魔法公式……杨凡最近很倒霉。 还做怪梦,梦见已故多年的爷爷让他烧纸钱,收快递。 然后他便真的收到了一个寄件人是爷爷名字,寄出地址写着阴曹地府的快递。 从此,杨凡一边修仙,一边沉浸在烧纸的乐趣中,纸钱、纸人、纸车、纸别墅、坦克、飞机…… 对此爷爷表示非常满意,反手给他寄了一堆阴间特产,功法、丹药、法器、符箓、鬼物…… 爷爷:吾孙天纵奇才,有大帝之姿! 杨凡:不为别的,我只是孝顺而已!夏炙一觉醒来发现自己穿越到了平行世界。 这里的人竟然将游戏定位第九艺术,玩家为了玩到一款好玩的游戏出多少钱买都愿意,游戏设计师成为最热门的行业。 夏炙狂喜,因为上个世界的无数经典游戏,这里的人竟然都没玩过。 于是一名超级天才游戏设计师诞生了。 美女导师:“我不配做陈欢的导师,他的‘马里奥’足够让我学一辈子。” 游戏测评员:“‘塞尔达’是足以改变世界的游戏,陈欢领先了业界一千年。” 攻略大佬:“扶我起来,我要和苇名一心拼刀,别拦我我还能送!” 全球玩家:“夏炙快点出新游戏,多少钱我们都买。” 其他游戏设计师:“年度游戏还选什么,直接给夏炙算了。” 夏炙本人:“别急别急,在做了(新建文件夹)。”传说中破军、七杀、贪狼三星齐出,便是天下板荡、改朝换代之时。一个表面看还处在盛世,但平静的表面下却是危机重重。内有诸王夺嫡,外有敌国虎视眈眈的朝代,却突然出现三星联动的天象异变。暗藏野心,手握天下财富有三成的勋臣之后。夺嫡之争越演越烈,甚至动辄刀兵相见的诸皇子。雄踞西北,一心想要割据一方的游牧铁骑。还有潜藏在西南,时刻不忘恢复故国的前朝余脉。三凶星的预言,究竟会落到谁的身上?黄琼,一个自幼生长在冷宫中的皇子,面对复杂的局面,究竟该如何破茧而出,该怎样才挽回危局重定河山?主角李萧雨穿越到了修仙世界,开启了一番奇妙的旅程60年代的一次偶然相遇,从此,他和她的命运便紧紧联系在一起。他为了她,抛弃地位和财富,宁愿一切从零开始。她为了他,含泪步入他门,但心灵深处却从未与他远走。两心相依,是他们今生的企盼。来世聚首,是他们此生最大的心愿。且看他们在生命的路途中,如何用青春的音符,演奏一曲都市恋歌;怎样用智慧和汗水,携手编织明天的彩虹。一花一叶一少年,清风徐来半月阁! 千树万树终落叶,寻的半生安稳来!叶辰懂医术,会古武,下山后的他,还在幻想着自己逍遥纵横都市,吊打一切不服! 万万没想到,参加自己婚礼的时候,新郎竟然不是他……
啥?末日来了? 开局获得最强宗门系统 :忆 从一只猫开始 卍生界 大梁镇妖司 返祖我的先祖是曹孟德 毁坏的三观 天不生我 震空 忘归潮 仙王赘婿 诸界剑尊 老子叫胡斐 陌上花开之徐徐而归 消失的罪人 画面重现 我们想说的话 向世界说你好 重生之超级导演 眉山到丹棱的客车电话 华丰月饼 业务电话 平海大酒店地址电话是多少钱 阳朔花田电话 宁德寿宁车站电话 怎么拨打泰国清迈电话 平海大酒店地址电话是多少钱 武汉到郑州大巴车电话多少 宁德寿宁车站电话 莆田御庄园温泉度假村电话号码 平海大酒店地址电话是多少钱 平海大酒店地址电话是多少钱 怎么拨打泰国清迈电话 苏州金 大酒店电话号码是多少钱 香港电话卡显示 烟台到北京高铁电话是多少钱一个月 中国电信拨打韩国电话 宁德寿宁车站电话 佛山乐安公安局电话 铜山区派出所电话 苏州金 大酒店电话号码是多少钱 铜山区派出所电话 佛山乐安公安局电话 江苏省无锡市东降镇圆通电话 前埔西社区电话 怎么拨打泰国清迈电话 天紫广场电话 龙悦国际回龙观电话 佛山乐安公安局电话 宁德寿宁车站电话 烟台到北京高铁电话是多少钱一个月 仁怀电话 电话节是在什么时候 香港电话卡显示 蒲城美如家的电话 平顺宾馆电话 电话节是在什么时候 高铁售后电话号码 怎么拨打泰国清迈电话 西安楠林酒店电话 平顺宾馆电话 华丰月饼 业务电话 鲁山乐谷ktv电话 中国电信拨打韩国电话 阳朔花田电话 仁怀电话 平海大酒店地址电话是多少钱 平顺宾馆电话 怎么拨打泰国清迈电话 深圳地王观光营业电话 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 异世界中的反派 灾源降临:开局重生 血之魅影之天下之盟 后周帝国 一介俗人 亚星游戏官网 万利官网 欧博游戏官网 亚星游戏官网 葡京官网 莆田御庄园温泉度假村电话号码 莆田御庄园温泉度假村电话号码 太原汽车总站电话多少时间 怎么拨打泰国清迈电话 top花园道店电话多少钱 深圳地王观光营业电话 前埔西社区电话 莆田御庄园温泉度假村电话号码 高铁售后电话号码 平海大酒店地址电话是多少钱 天紫广场电话 平顺宾馆电话 前埔西社区电话 鲁山乐谷ktv电话 江苏省无锡市东降镇圆通电话 蒲城美如家的电话 莆田御庄园温泉度假村电话号码 电话节是在什么时候 日本如何租电话号码 日本如何租电话号码 武汉到郑州大巴车电话多少 top花园道店电话多少钱 前埔西社区电话 华丰月饼 业务电话 阳朔花田电话 中国电信拨打韩国电话 龙悦国际回龙观电话 电话节是在什么时候 苏州金 大酒店电话号码是多少钱 鲁山乐谷ktv电话