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
云南大额房产抵押贷款公司房屋抵押贷款房管局评估费用云南大额房产抵押贷款公司贷款提前还好吗常州楼市贷款政策如何去银行贷款买车我国小额贷款公司发展小额贷款有关消息连云港市小额贷款公司云南省挂包帮可以贷款多少建行贷款 现金云南大额房产抵押贷款公司贷款中介机构有哪些装修贷款打在谁的账户小额贷款有关消息云南省挂包帮可以贷款多少建行提前还公积金贷款第二套房贷款政策2016第二套房贷款政策2016房产抵押贷款费用公司贷款抵押登记费第二套房贷款政策2016连云港市小额贷款公司上汽金融贷款好审批吗常州楼市贷款政策房产置换 贷款贷款提前还好吗上汽金融贷款好审批吗房产抵押贷款费用贷款中介机构有哪些穿越成了女儿身,竟然还是一代女皇!?看着眼前丰腴的身姿却无福消受,本以为自己会平平蛋蛋的度过这一生,没想到这还是个修仙世界?本为诸神之首,却在与七大神界碰撞时被诸神计算,陷入轮回黑洞,拼掉所有神器破开黑域后,发现来到了一个类似于曾经自己所属神界管辖内的一个世界,在这里,开始了新的修炼之路混沌初开,九曲百转。混元裂变,四帝神萃。玄幻与科技相容,神魔与人情相生,替天行道,看黎明破晓,重补天道。有没有想过三国时代最根源是从哪里来? 天下大势? 合久必分? 有没有想过是汉末第一导演袁绍谋篇布局了非常精妙的189年东汉皇权大崩塌...一朝穿越成为有钱人家的纨绔少爷,本想着就这样当一辈子纨绔子弟,奈何实力不允许啊... 于是,斗反派,除奸佞,平天下,看着自己彪悍的战绩,萧子澄很无奈: “我明明只想当个败家子来着....” 梦在现实中成真就不是梦,现实走到尽头都是黄粱一梦!这是一个从梦开始的故事!天玑星附体的农村小伙考上大学,从此开启了奇异的经历,爱恨情仇,一段奇异的修炼之路。秦柯扫了算命先生手绘的二维码,下载了一款神奇的手机app,这款神奇app名曰“仙魔交易商城”,商城内买卖各种奇珍异宝,这些东西以前的秦柯莫说见过,就连想都不敢想。  从此,籍籍无名的平凡小青年,开始走上人生巅峰…【女帝】、【脑洞】、【搞笑】 一位普通的网文读者云逸,穿越到了看似平常的异世界。 熟读套路的他,开局就抄了前世的一本经典仙侠小说,想要通过网文赚取第一桶金。 但没想到。 这个世界,正处于灵气复苏不久,修行之法还未开创的时代。 所以,当云逸小说火起来的同时,一部分人发现... 小说里的修行功法、锻器手段、炼丹丹方,竟真的全部可以模仿使用! 此刻,全球震惊,各国开始紧急接触云逸! “仙帝无私奉献,哪怕是圣品功法也未曾藏私,令人钦佩!”有人族修士恭敬道。 “师父悉心教导,润物细无声,让我受益匪浅。”女帝徒弟言笑晏晏。 “仙帝一剑斩妖,救人族于水火,此等胸怀,我难以企及!”有人族大能跪拜。 自此,云逸被全球的修行者们尊为“开天地新生,创万界新道”的原初仙帝。本书源自一段驻村工作经历改编!十弟出生时,是家中第10胎,他有9个姐姐,1个弟弟。漂亮的母亲险些被抓去结扎,在激烈对抗中,镇计生专干要求这夫妇必须结扎一个,父亲霸气地向计生专干组要了十五分钟,随即跟上计生专车去了医院…… 十个月后,林家第11个孩子出生了,男孩!回顾粤地初开,广信大地一幕幕的河山足迹,是华夏文明生生不息的延续! 本故事纯属虚构!一个传奇网游,一把剑,看一个游戏天才如何问鼎武道顶峰,成就一代枭雄,而命运之神又会如何安排呢?是懦弱还是其他?是废材蠢才还是其他?
禁锢! 御灵日记 娱乐:从密室大逃脱开始 惊悚爷可是正经的鬼界居民 让你吃软饭,你却带家族崛起? 销锋镝:北国蚁梦 魔女大人新世界冒险中 网游之下呀下大雨 情丝渐暖九州寒 我在异世界种田 茗刀 末日求生之现实 天相述 女帝:世子才是真无敌 人在末世,打造虫族大军 白日列车 生命永恒的密码 望枫天地行 从蛇开始的进化 社团指导老师 房租所有人去世后房本借别人贷款 表外 贷款分录 建行提前还公积金贷款 常州楼市贷款政策 房租所有人去世后房本借别人贷款 房屋抵押个人贷款 成都 公积金贷款 房屋有抵押 贷款45万分16年还请月供多少钱 房产置换 贷款 贷款中介机构有哪些 连云港市小额贷款公司 贷款一分的利息是怎么算的 公积金贷款 账户抵押 表外 贷款分录 如何去银行贷款买车 常州楼市贷款政策 成都 公积金贷款 房屋有抵押 房产置换 贷款 公司贷款抵押登记费 云南大额房产抵押贷款公司 表外 贷款分录 小额贷款有关消息 房屋抵押贷款房管局评估费用 装修贷款打在谁的账户 云南省挂包帮可以贷款多少 公积金贷款 账户抵押 房产置换 贷款 房屋抵押贷款房管局评估费用 公司贷款抵押登记费 房产置换 贷款 常州楼市贷款政策 表外 贷款分录 建设银行小额贷款的背景 如何去银行贷款买车 上汽金融贷款好审批吗 常州楼市贷款政策 建设银行小额贷款的背景 建行提前还公积金贷款 公积金贷款 账户抵押 小额贷款有关消息 贷款提前还好吗 贷款38万20年提前还款哪个划算 贷款买车能不能讲价 贷款一分的利息是怎么算的 装修贷款打在谁的账户 表外 贷款分录 贷款一分的利息是怎么算的 贷款提前还好吗 公积金贷款 账户抵押 我国小额贷款公司发展 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 龙之爪牙 黑黯 重生全能系统天之骄子 带着手机去万界 寒门枭龙 亚星管理平台 亚星官网 万利官网 亚星管理平台 澳门葡京官网 无抵押汽车贷款 贷款提前还好吗 连云港市小额贷款公司 贷款45万分16年还请月供多少钱 公积金贷款 账户抵押 上汽金融贷款好审批吗 贷款中介机构有哪些 无抵押汽车贷款 表外 贷款分录 连云港市小额贷款公司 我国小额贷款公司发展 房屋抵押个人贷款 如何去银行贷款买车 贷款45万分16年还请月供多少钱 成都 公积金贷款 房屋有抵押 房产抵押贷款费用 贷款中介机构有哪些 建设银行小额贷款的背景 贷款45万分16年还请月供多少钱 云南省挂包帮可以贷款多少 上汽金融贷款好审批吗 上汽金融贷款好审批吗 贷款38万20年提前还款哪个划算 贷款中介机构有哪些 表外 贷款分录 云南省挂包帮可以贷款多少 无抵押汽车贷款 建行提前还公积金贷款 公司贷款抵押登记费 小额贷款有关消息