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
路漫漫电影下载星月无尽 电影小字辈电影 下载读心术电影影评读心术电影剧情路漫漫电影下载哈利·波特与魔法石电影小字辈电影 下载电影大泽龙蛇的剧中人与扮演者武术老电影蝴蝶梦英文版电影路漫漫电影下载2015中韩合拍的电影钢铁侠3电影免费观看小字辈电影 下载武术老电影经典电影或电视剧电影读心术结局电影读心术结局伴雨行电影精舞门2 电影电影读心术结局电影大泽龙蛇的剧中人与扮演者孙红雷不看王祖贤电影读心术电影剧情陈友旺的电影读心术电影影评山炮进城电影完整版免费湘南暴动电影2015中韩合拍的电影“你说,这个世界上,真的有魔鬼吗?” “当然,你不就是?” “杀人偿命,天经地义啊。”异世界和地球发生融合,蛮荒神灵和人类文明都对彼此的世界虎视眈眈,然而世界规则的不同,皆都素束手无策。  武道开始兴起!正义也许会迟到,但是绝对不会缺席! 男人都要学会自己长大,面对所有荆棘坎坷,只有奋不顾身,勇往直前!能拯救你的,只有你自己! 抖音同号:秋风听雨建筑集团老总许勇,穿回到1986怂人狗娃的身上。 前后两世记忆一融合,他瞬间变得强大。 拳打村霸,棒扫混混英雄救村花。 夜总会遇伯乐,他的人生从此开挂。 组建乡村建筑队、办醋厂、种果树。 直到集团公司上市。 用超前三十多年的人生经验赚这个时代的钱,岂不是很容易? 看《超级农民工》为自己补办一场错过的人生盛宴。救人一命胜造七级浮屠,美女施主,你我有缘啊...三流大学毕业的杨易,好不容易在广深一家公司混到人事主管的位置,可突如其来的泄密风波,导致他和女友分了手,当他穷困潦倒之际做起了一名凶宅试睡员,偶然间在床底下捡到一个水晶球。 从此,这个世界在他眼中变了…… “叮!恭喜宿主获得程咬金被动-舍生忘死……”【传统玄幻+帝君重生+剑道+热血逆袭+太荒至尊体】   万年前,东凰帝君功参造化,万古寂寞下孤身闯入寂灭剑墟,寻找最强之道,却始终没有自那片禁地中走出。 万年后,纪元迭起,轮回初开,一个被夺去灵骨的少年在奄奄一息之际,恍然间觉醒前世记忆。 苏道尘伫立在山巅,负手而立,昂首透过无尽云层望去,眼神淡漠,“这一世,我将是这诸天万族的劫!” 特殊体质,资质绝佳,修炼救母。红尘中相视一眼,续写剪不断情缘。 不争大世,不逆天道,顺势修仙。无尽岁月一浮尘,凡人亦可登绝巅。平平淡淡的日子永远不会到来吗? 这个世界会有不可思议的事情发生吗? 我到底要以怎样的方式去活着,他们到底是人还是“鬼” 深渊之下,一双双非人的眼眸兀然睁开,紧盯着我的身体,身体就像是被施了定身术一般,难以动弹,根本来不及多想,我只知道头也不回地向前跑去。 跑着跑着,慌不怿路的我被一根破烂不堪的白骨绊倒了,被绊倒的我迅速地从地上站了起来,却发现竟不知从何时起,我早就已经沦为了一直追在我身后的怪物之一。 “这里是哪里?身后的这些可怕的怪物又是从哪里来的呢?”无尽的疑问在心底升腾而起。 眼前发生的这一切究竟是梦境还是地狱?
异想天开的高中 诸天,从华山开始 不为谁而作的故事 妖道傲天 失意的猫 末法封魔人 异瞳者1 我带着系统回来了! 三国:砍我!拼团秒杀刘备! 万古第一灵帝 自然神灵录 为什么我的绝世女弟子们这么恨我 当冥帝苟在人间 大小姐的末世保镖 圣法之巅:纪元 苍茫黄天之下 末世游戏之魔法师 高考时魂穿,从奴隶开始 剑道九官 碧海之蓝 东风破电影台词 吴建国僵尸电影 经典电影或电视剧 电影读心术结局 东风破电影台词 陈友旺电影 许海峰的枪 电影 电影演员顾玉琴 陈友旺的电影 2015中韩合拍的电影 电影大泽龙蛇的剧中人与扮演者 电影大泽龙蛇 孙红雷不看王祖贤电影 武术老电影 2014年1月最新电影 读心术电影剧情 许海峰的枪 电影 陈友旺的电影 精舞门2 电影 路漫漫电影下载 吴建国僵尸电影 小字辈电影 下载 星月无尽 电影 钢铁侠3电影免费观看 武术老电影 孙红雷不看王祖贤电影 陈友旺的电影 星月无尽 电影 精舞门2 电影 陈友旺的电影 读心术电影剧情 吴建国僵尸电影 读心术电影影评 路漫漫电影下载 山炮进城电影完整版免费 读心术电影剧情 电影读心术 许海峰的枪 电影 孙红雷不看王祖贤电影 电影读心术 读心术电影剧情 关于伍尔芙的电影 伴雨行电影 电影大泽龙蛇 钢铁侠3电影免费观看 吴建国僵尸电影 电影大泽龙蛇的剧中人与扮演者 读心术电影影评 湘南暴动电影 哈利·波特与魔法石电影 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 我的地球是个废材! 最后,我们终能相见 穿越之我在西游卖军火 糖汕烧烤之刷短视频修仙 在异世界的我要小心生存 万利游戏官网 欧博游戏官网 皇冠登3出租 万利游戏官网 快连下载 陈友旺电影 山炮进城电影完整版免费 路漫漫电影下载 电影读心术 蝴蝶梦英文版电影 电影大泽龙蛇的剧中人与扮演者 陈友旺的电影 吴建国演的电影僵尸 精舞门2 电影 电影演员顾玉琴 山炮进城电影完整版免费 许海峰的枪 电影 电影读心术 电影读心术 湘南暴动电影 伴雨行电影 陈友旺的电影 山炮进城电影完整版免费 星月无尽 电影 小字辈电影 下载 钢铁侠3电影免费观看 电影大泽龙蛇 陈友旺的电影 读心术电影剧情 情剑电影结局 武术老电影 孙红雷不看王祖贤电影 电影大泽龙蛇 读心术电影剧情 读心术电影影评