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
怎样提高邮票的中签律2012年集邮总公司方连邮票册建行发型的猴年金邮票2015面邮票哪里有发售韩国1974邮票邮票金砖价格2016年邮票大版票建行发型的猴年金邮票怎样用邮票寄包裹百分邮票收藏网1980年奥运邮票怎样提高邮票的中签律猴年红红火火邮票全国摇号邮票邮票金砖价格1980年奥运邮票1983天鹅邮票2015面邮票哪里有发售2015面邮票哪里有发售鲤鱼跳龙门邮票市场价怎样用邮票寄包裹2015面邮票哪里有发售夫子庙的邮局还能买到邮票吗邮票世纪宝鼎价格用边长为四厘米的邮票二十枚2012年集邮总公司方连邮票册建行发型的猴年金邮票j13纪念周恩来逝世一周年邮票邮票图案是狮子林桃花邮票现在价格“真遗憾啊洛黎,快走吧,不要回头,不要留恋,平淡的过完这一生吧” 洛黎回到十一年前那个初见的时间,短发的永雨拉开玻璃门,仿佛又拉开了命运的门。 就算时间的长河会将你遗落,我也会渡着破旧的小船,将你寻回。 洛黎手握长刀再次挥向无尽的黑夜。当悲惨的命运降临在一个人头上的时候,无可奈何的选择离开这个世界的时候,却又莫名其妙的发生了难以想象的事情,一系列不愿意却又无可奈何的时候,却又无能为力的时候,他就像坐上了过山车一样,发生了惊险又刺激游戏一般的亲身体验,想停都停不下来。他自己已经难以承受穿越给他带来的折磨与痛苦。却又无能人能够帮助他的时候,他却意想不到的桃花运不断,一次次的穿越磨炼着他的身心,在那么难以承受的环镜条件下,却得到了终心不变的爱情,历尽磨难真情在,痴心不改遇良人,好不容得到了来之不易甜蜜爱情时,却又被穿越无情的分开。当他想尽一切办法想回到心爱的妻子身边却又回不去了,无奈放弃的时候。却又阴差阳错的又回到朝思暮想的妻子身边。这都是穿越的罪过,一次一次给了希望却,又无情的给了他失望。他的人生实在酷。从古至今天下第一奇人……当午夜的钟声响起,诡秘撕开黑暗的面纱,夜行人间。 沉寂林中尸体搭建的小屋,挂满无头死尸的参天巨树,凭空塌陷的万米巨坑中传来谁的吟唱? 尸骸朝圣,百鬼夜行 ,凝固的海…… 异境层出不穷。 羊头人,豚蛇,祸猪,俎肢异形,黄昏巨人,亵渎暴君坎加厄…… 一个个诡异生物于罪恶晦暗中诞生,屠戮人间。 少年王也发现他有一个可以进行角色扮演的黑暗世界,在这里,他可以挑选这个世界存在的……怪人进行角色扮演,获得他们的能力。 火人杰克,地鸣戈加顿,黑暗哥特加尔,面具柯暮以及那黑夜之上的死神耶格利特…… 这是一个人与邪异共存的世界。 罪恶祸乱人间,牧户一战中让王也知道了自己需要承担的责任。 他的心态由此发生转变。 他将握着黑夜世界,化为暗暮中的野兽,以最凶残的姿态撕裂罪恶!魏国都城金陵,一位神秘少年出现在一个茶楼遇到了一位女孩,随着少年身份的逐渐揭开,他将在一系列大事件的考验中展现自己浩瀚的家国情怀只有千锤百炼才能成就,一次又一次的折磨换来一次又一次的强大,从仁心到黑化,是一次又一次的绝望的经历!【老白文+单女主+扮猪吃虎+轻松搞笑】 林一穿越到蓝星一个穷困的大学生身上,为了给家里的父母治病,同时供妹妹上学,原主借了一屁股贷款,同时一天打两份工,最后猝死在工地上。 魂穿此身,林一也被原主各种贷款压得喘不过来,此时此刻,林一游戏系统觉醒,在这个精品游戏匮乏的蓝星,林一先是祭出两款沙盒神作,对蓝星单机市场降维打击,同时又以雷霆速度组建自己的3a游戏项目组,带给蓝星一个又一个的游戏奇迹!他,长生王者,为了却心愿,乘兴而归,甘愿伴她左右,护她周全。 为她,逆了天下,只为一言之诺,蓦然回首,踏血而歌! 为她,亡了诸国,只为一怒红颜,腥风血雨,血染皇城!我,不想当全宇宙第一人,我不想独霸天下,唯我独尊! 因为我没有天赋,我没有外挂,我只有我自己,我只想安安静静的,当一个地球实力第一人! 天才少年萧辰,灵台被族人夺取,沦为废人,受尽屈辱,幸而觉醒神物九龙塔,拜得神秘少女为师,吞噬九天之灵,融万族血脉,以九龙之体,战尽天下英豪!李言在某个夜晚入睡时发现自己进入到了一个未知的世界,在这里,他将开始自己的冒险
神级纨绔在都市 为长生不断奋斗 能隐者 虫族入侵,我誓死守护人族 猛鬼大厦 警界神探 神奇之环 我在恶魔时代当战神 当局者清 撼世魔威 天下神少 废柴的重生日记 别人修道我修妖 凌晨网约车 大唐之最强熊孩子 超能剑神黎明的死神 蜀山轶事 蛮荒世界的记忆:万王之王 满级开始的异世界生活 昌南玖事 北京居民八分邮票 绿色两分邮票 邮票荧光码模糊 千里江山图邮票淘宝 北京居民八分邮票 邮票世纪宝鼎价格 夫子庙的邮局还能买到邮票吗 桃花邮票现在价格 j13纪念周恩来逝世一周年邮票 猴年红红火火邮票 怎样用邮票寄包裹 2016年邮票网上预订 鲤鱼跳龙门邮票市场价 百分邮票收藏网 邮票金砖价格 韩国1974邮票 夫子庙的邮局还能买到邮票吗 j13纪念周恩来逝世一周年邮票 邮票版式一是大版吗 怎样提高邮票的中签律 绿色两分邮票 建行发型的猴年金邮票 2012年集邮总公司方连邮票册 全国摇号邮票 百分邮票收藏网 鲤鱼跳龙门邮票市场价 j13纪念周恩来逝世一周年邮票 2012年集邮总公司方连邮票册 邮票版式一是大版吗 j13纪念周恩来逝世一周年邮票 韩国1974邮票 绿色两分邮票 用边长为四厘米的邮票二十枚 怎样提高邮票的中签律 邮票图案是狮子林 韩国1974邮票 用边长为四厘米的邮票二十枚 邮票荧光码模糊 鲤鱼跳龙门邮票市场价 用边长为四厘米的邮票二十枚 韩国1974邮票 2016年邮票赠送版价格 邮票金1180价格 2016年邮票网上预订 全国摇号邮票 绿色两分邮票 2016年邮票网上预订 2015面邮票哪里有发售 邮票 关公绢质小型张 2016年邮票大版票 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 入屠 绝命抉命 谛劫:极仪之战 将之道 我的世界灵力首部灵力大陆 葡京官网 快连下载 欧博官网 葡京官网 欧博官网 用边长为四厘米的邮票二十枚 邮票金砖价格 百分邮票收藏网 全国摇号邮票 邮票图案是狮子林 怎样提高邮票的中签律 猴年红红火火邮票 邮票 关公绢质小型张 百分邮票收藏网 邮票世纪宝鼎价格 j13纪念周恩来逝世一周年邮票 百分邮票收藏网 建行发型的猴年金邮票 鲤鱼跳龙门邮票市场价 邮票 关公绢质小型张 北京居民八分邮票 邮票世纪宝鼎价格 邮票金1180价格 怎样提高邮票的中签律 千里江山图邮票淘宝 夫子庙的邮局还能买到邮票吗 北京居民八分邮票 2016年邮票赠送版价格 怎样用邮票寄包裹 绿色两分邮票 邮票世纪宝鼎价格 邮票荧光码模糊 建行发型的猴年金邮票 建行发型的猴年金邮票 邮票图案是狮子林