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
香河优速物流电话是多少咸阳申通快递迎宾大道网点电话香河优速物流电话是多少湘潭县电话区号湘乡市百世汇通快递电话香河优速物流电话新蔡县邮政速递电话湘潭高新区 百世快递电话厦门同安百世快运投诉电话小赖物流电话咸阳渭城区快递电话香河优速物流电话是多少新碧顺丰电话号码湘阴县城申通快递电话湘潭高新区 百世快递电话小赖物流电话新蔡县周潢路ems电话湘阴县百世快递电话是多少湘阴县百世快递电话是多少香河优速电话厦门优速网点查询电话湘阴县百世快递电话是多少厦门同安百世快运投诉电话西宁市城东区申通快递电话湘乡市百世汇通快递电话咸阳市天天快递的网点电话查询湘潭县电话区号西宁市城东区申通快递电话香河优速电话新碧顺丰电话号码叶诚,华夏大学医学院学生,2010年某天,他和同学们一起到‘天涯海角’风景区游玩,在一个山洞之中,叶诚捡到一块玉佩。   没想到这块古玉是沈万三的,由于这块古玉的吞噬性很强,叶诚和李小娜被一道闪电击中,带到明朝。   …………   “啊……救命!”   “有谁能救我啊!”   “哪个SB啊,大早上谁打来的电话?吵死了!”   “肯定是叶诚这家伙!”   “行了,都别说了,班长下指示了!”   史海涛喊道:“孙平,你的女人缘最好,由你通知女生宿舍!吕帅帅通知501、502、503宿舍,龙欢负责通知601、602及校外的同学。”   孙平连忙穿好上衣坐起来,笑道:“没问题啊!正好我每天早上跟女朋友有接吻的习惯!”违逆常理之神话,在破败中前进。少年成长之途,这路,通往未来的荣光,也连接了旁人的过往……时间长河若有尽头,我只看一眼,便回来找你。 哪怕武道极致,哪怕商道极致,只为那一句承诺。 什么《经商十年算法》,什么《武道十段成神》。 与我而言,倘若与你无关,便是浮云。以完美的道构建世界。 完美的道是正是邪、是善是恶?完美的世界又是怎样一番模样?穿越【大武神】世界,成为一名外门魔教弟子,本以为这辈子彻底废了,没想到金手指到账了。 开局老天爷赐了一双慧眼,可以查看人生剧本! 随手在地牢捡了一名被关押的圣地女弟子,竟是女皇遗孀… 【姓名】:慕卿颜 【修为】:气武境八重 【命格】:女皇遗孀(紫)、天命皇运(紫)、皇朝气运(紫)、旺夫(紫)、主角光环(紫)寒冰女武神转世(紫) 【天命值】:85 【人生剧本】:《大武神》女主角 【好感度】:0 【近期天命机缘】:五个月后,皇灵教廷被攻陷…… … … 路上随手查看一名魔教弟子! 【姓名】:韩龙 【修为】:灵武境六重 【命格】:天命配角(蓝) 【天命值】:16 【人生剧本】:《大武神》天命反派狗腿子 【好感度】:-15 …… …… 随着人生剧本开启! 天命大反派,天命主角,天命配角,一一浮出水面!“叮!菩提树下签到成功!主人悟性提升一千点!”   “叮!练功房签到成功!主人修为提升一万年!”     “叮!神兵房签到成功!奖励主人盘古开天斧一柄!”   宁浩远开局闭关签到一万年,狂刷奖励无数,在这一万年里,他随手调教的弟子,在外界掀起一阵又一阵狂澜。   他点化的一条鲤鱼,成了妖族龙祖。   他栽种的柳树,成了仙界最强祭灵。   他家菩提树枝头的荒雀,涅槃成了神凤。   他收留的神族少女,成为一代女帝。   他随手捡的弃婴,成了举世闻名的剑仙。   ……   他本以为可以一直签到下去,谁知有一天因他太强,系统居然吓崩了!   而这时后世美女徒孙磕头求见。   “老祖宗,快出山!”   “你的徒子徒孙都被人抓走了!”   “咱们玄剑圣地,要没了!”   于是,宁浩远出山。 万界战栗!29岁的天岚,事业无成,刚刚朋友也和自己分手,独自一人走在熟悉的街道上,往事历历在目,也许终究是自己错了,但你们却也不该这样对我······ 如果能够回到过去,我想我一定······所思既所得 所想既所有——觉界所以屹立万界之巅,便因这独特而强力的位面法则。但当法则被撕碎,界灵被污染,又待谁来力挽狂澜?小小下界之子林韦,被迫卷入这场黑暗漩涡,又将翻起多少波澜? 长恨画戟不似月,一耀寒光洗九天。 界岩,作为一座都城的王,从来没想到自己会成为游离三界的守护神,见证人世间的生离死别,或蔚籍逝者,安息灵魂;或覆手家国灭亡,只为人世间最大的安宁。
异变灵界 永恒的道 卡牌大陆我的幸运值是满的 寞路血郎 妖人在都市 我有一扇任意门 这年头谁还没个超能力了 天魔之引 这个万界快递小哥可太刑了 诸星浩劫 异界圣堂 定北王 无敌后的闲置生活 天庭打工仔 剑仙转生 赴灭乾坤 晨昼 一个兔子开始的故事 幻想手册 我在大汉守夜养鬼 厦门思明区百事快递电话 筱村镇中通快递网点电话 厦门海沧百世汇通快递电话号码 湘阴县城申通快递电话 厦门思明区百事快递电话 咸阳渭城区天天快递电话 厦门海沧百世汇通快递电话号码 新碧顺丰电话号码 西宁市城东区申通快递电话 新蔡县ems电话 厦门同安一部百世快运电话 厦门同安一部百世快运电话 香河优速电话号码 筱村镇中通快递网点电话 湘潭高新区 百世快递电话 湘阴县城申通快递电话 厦门同安百世快运投诉电话 西宁市城东区申通快递电话 咸阳市南郊天天快递电话 湘潭市电话 筱村镇中通快递网点电话 湘潭县电话区号 咸阳市天天快递的网点电话查询 湘阴县城申通快递电话 小赖物流电话 咸阳渭城区天天快递电话 咸阳市天天快递的网点电话查询 咸阳申通快递迎宾大道网点电话 厦门优速网点查询电话 咸阳市天天快递的网点电话查询 湘乡市百世汇通快递电话 小店区顺丰快递电话查询 湘潭市电话 香河优速物流电话 西宁市城东区申通快递电话 湘乡市百世汇通快递电话 湘潭市电话 新蔡县周潢路ems电话 咸阳渭城区天天快递电话 湘潭高新区 百世快递电话 湘潭县电话区号 孝昌邮政电话 香河优速电话号码 厦门海沧百世汇通快递电话号码 湘阴县城申通快递电话 小店区顺丰快递电话查询 厦门海沧百世汇通快递电话号码 湘潭县电话区号 咸阳渭城区天天快递电话 新蔡县邮政速递电话 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星游戏官网 左手魔法右手修仙 神仙学院:被迫和校花组队 从高中开始的修福报生活 破天成神记 地表最强系统 亚星游戏官网 万利游戏官网 欧博游戏官网 亚星游戏官网 葡京官网 厦门同安百世快运投诉电话 新蔡邮政ems电话 香河优速物流电话是多少 新蔡县周潢路ems电话 厦门同安一部百世快运电话 咸阳渭城区天天快递电话 厦门同安一部百世快运电话 厦门海沧百世汇通快递电话号码 咸阳申通快递迎宾大道网点电话 小店区顺丰快递电话查询 湘潭县电话区号 筱村镇中通快递网点电话 厦门思明区百事快递电话 厦门优速网点查询电话 厦门思明区百事快递电话 湘潭县电话区号 咸阳渭城区天天快递电话 厦门思明区百事快递电话 新蔡邮政ems电话 咸阳渭城区天天快递电话 香河优速物流电话 咸阳渭城区快递电话 香河优速物流电话 香河优速电话 湘潭高新区 百世快递电话 厦门同安一部百世快运电话 咸阳申通快递迎宾大道网点电话 厦门优速网点查询电话 湘乡市百世汇通快递电话 湘潭高新区 百世快递电话