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
个人住房贷款增长率按揭贷款选择哪家银行个人住房抵押贷款限制各大银行贷款软件各大银行的贷款软件个人住房贷款增长率30万贷款20年每月个人住房抵押贷款限制安国哪里有贷款的工商贷款还款标准各项贷款增幅公式个人住房贷款增长率工商银行贷款优惠调整各项贷款增幅公式个人住房抵押贷款限制工商贷款还款标准4万贷款提前还款违约金各大银行的信用贷款利率各大银行的信用贷款利率个人贷款审批流程安徽房抵押贷款评估费各大银行怎么贷款利率4s店买车贷款无息抚州高新区趣分期小额贷款有限公司各大银行的贷款软件夫妻申请公积金贷款额度各大银行贷款软件福特金融贷款手续个人贷款审批流程工商银行贷款优惠调整林大厨的故事!!!!!!!!【学霸文,甜宠风,黑科技,轻松日常】 “叮,恭喜宿主获得魅力*10。” “叮,恭喜宿主获得体质*10。” “叮,恭喜宿主获得智力*10。” “叮,恭喜宿主获得神级记忆力和悟性,可一目千行,过目不忘,举一反百……” 林北猝死,却魂穿平行世界,还从高三开始,并绑定神级全能学霸系统。 从此学水不在,一代神级学霸诞生。 “既然上天给我重生的机会,那我将脱胎换骨,努力上进,活出灿烂,不负本心。” 林北:“???” “咦,大家这是肿么了?” “我才出三分力,怎么就全倒下了?” “既然一个能打的都没有,那我只能研究曲率引擎和虫洞,探索星辰大海了啊!” 众人:“……” “收手吧阿北,求给条活路吧!” “我以为我考满分就够强了,可见到北神才知道,原来我还很菜……” “我以为我擅一道就厉害了,可北神竟天文地理,琴棋书画,医术体能,无所不精……” 又名《我,超级学霸,专治一切不服》《人在学校,离我远点,别打扰我看书》 听老人讲民间故事奇闻杂谈惊悚传说还有最终结果最后一次穿越,那就,战双帕弥什吧,去拯救那个破碎的世界,和灰鸦一起,去夺回人类的家园 [系统] 解析,重组,安装,改造 以首席指挥官的身份,我将向帕弥什发起进攻一个只有七岁的小男孩,没有任何修为。。。 一个凡人就敢叫板修炼者、最后差点死掉。。。 不被亲戚以及任何人待见的王无尘,晕倒在路边,被七彩宏光救醒。。。 撞见小姑被辱 激发无名怒火,唤醒七彩红光,使七彩发生变异,从此身高定格在一米六五。。。 被人侮辱、辱骂、各种各样的嘲笑都不在乎,就是不能触碰底线。否则,让你知道花儿为什么那样红。。。 宇宙掌控者阻挡我,我就撑破你的宇宙,把你的宇宙挤压成一团。 王无尘一步一步的建立门派,带领兄弟,踏着纨绔子弟、自以为是、狗仗人势的肩膀踏上修真界,踩着修真界、仙界、神界、圣界、虚无界、甚至宇宙掌控者的尸体,走上哪个高度,成为无上主宰春秋五霸,战国七雄,合纵连横,逐鹿中原朋友问我,没谈过恋爱你怎么写爱情小说啊! 哼,没谈过恋爱怎么了。 没谈过我还没见过吗?【传统玄幻+无系统+剑修+无后宫+不无脑】 百年后,一位手拿残剑的少年走进了人们的视野之中,他笑看风云志,一剑破万象,开合之间竟然有当年那位的影子……为人师者,授徒的最高境界就是青出于蓝而胜于蓝。 可李棋不这么认为,因为坑爹的师徒系统,无论是神功秘籍还是法宝丹药……居然全都只有徒弟的份! 教出来的徒弟一个比一个厉害,自己却还是个弱鸡该怎么办? 危险重重的世界,一个没实力的废柴宅男又该怎么自保? 在线等,急! …… 于是李棋想通了,既然自己不能变强,那他就要教出一批可以保护自己的最强徒弟! 收徒法则第一条:天大地大师父最大! 李棋:“少年,你渴望力量吗?那就当我的徒弟吧!”灵兽人程森屮(che四声)十一岁丧母,十三岁遭灭族。程森屮,程猖,程狂兄弟三人幸存。一年后大哥程猖却操纵程森屮杀死小时密友和程猖,心灰意冷的程森屮消失了三个月后在长安佚名“山狼”靠杀人赚钱。两年后,“山狼”声名崛起无意间认识权门高氏二公子和洌氏二公,这时有人叫杀死两人。山狼不从,没曾想那人正是大哥程猖。几经挣扎后,山狼坠于程狂和卫天兰坠落的黑鹰崖。 十年后 顶级杀手——山狼,再次出现在高风舌眼前。 正义也许会迟到,但永远不会缺席。
女侦探童念之地下皇帝 一剑封情 天界重生异能者 一身功夫闯校园 所得与所失 域外天魔?本座一剑可屠! 三国:二公子 镜塔 诸天第一君子 超级人工智能 走啊,不是说一起吗! 侃爷历险记 小叶子的幸福生活 文亦有道 修真神医在都市 流落荒岛的那些事 从海贼开始诸天签到 末世求生:开局到账1000亿 天门山 寄心生梦 澳门贷款需要什么条件 工商贷款还款标准 4万贷款提前还款违约金 各大银行的信用贷款利率 澳门贷款需要什么条件 福建省助学贷款 800万房子一月贷款多少 工商银行贷款清单 夫妻申请公积金贷款额度 工商银行贷款优惠调整 4s店买车贷款无息 4s店买车贷款无息 抚州高新区趣分期小额贷款有限公司 工商贷款还款标准 个人独资企业贷款政策 各大银行的贷款软件 90平二手房贷款评估费 夫妻申请公积金贷款额度 按揭贷款选择哪家银行 个人住房贷款增长率 工商贷款30万三年月供 个人住房抵押贷款限制 按揭贷款选择哪家银行 各大银行怎么贷款利率 工商银行贷款清单 抚州高新区趣分期小额贷款有限公司 夫妻申请公积金贷款额度 按揭贷款选择哪家银行 安徽房抵押贷款评估费 夫妻申请公积金贷款额度 各大银行的信用贷款利率 工商贷款30万三年月供 各大银行贷款软件 个人住房贷款增长率 抚州高新区趣分期小额贷款有限公司 各大银行的贷款软件 个人专利能贷款吗 800万房子一月贷款多少 抚州高新区趣分期小额贷款有限公司 个人专利能贷款吗 各大银行的贷款软件 工商银行贷款审批多久 个人贷款审批流程 90平二手房贷款评估费 各项贷款增幅公式 工商贷款30万三年月供 4s店买车贷款无息 各大银行的贷款软件 高要市公积金贷款利息 30万贷款20年每月 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 择途 武侠五分钟 CSGO之世界顶峰 初心未忘 时间若可重来 欧博游戏官网 百家乐官网 亚星管理平台 欧博游戏官网 亚星管理平台 高要市公积金贷款利息 澳门贷款需要什么条件 抚州高新区趣分期小额贷款有限公司 个人贷款审批流程 各大银行贷款软件 30万贷款20年每月 安徽房抵押贷款评估费 工商银行贷款清单 800万房子一月贷款多少 各大银行怎么贷款利率 澳门贷款需要什么条件 30多年二手房能贷款吗 个人独资企业贷款政策 个人独资企业贷款政策 福建省助学贷款 福建省助学贷款 安徽房抵押贷款评估费 按揭贷款选择哪家银行 90平二手房贷款评估费 个人贷款审批流程 各大银行贷款软件 30多年二手房能贷款吗 安国哪里有贷款的 个人住房抵押贷款限制 4万贷款提前还款违约金 各大银行怎么贷款利率 按揭贷款选择哪家银行 工商银行贷款优惠调整 个人贷款审批流程 个人贷款审批流程