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
电影 钢琴教师没有明天 电影奥特物所有电影宫电影演员表触不可及电影对白电影 钢琴教师韩国伦理电影网盘奥特物所有电影大瓜电影网同志电影看巴士 迅雷下载阶级斗争老电影电影 钢琴教师韩国电影 hipster阶级斗争老电影奥特物所有电影同志电影看巴士 迅雷下载美国电影穿越时空的爱恋电影世界之爱上中文电影世界之爱上中文邻居电影版电影崩溃迅雷下载台湾电影搞笑电影浪潮经典台词青萍果电影范冰冰触不可及电影对白漫威电影大冒险宫电影演员表柏林电影节截止日期邻居电影版韩国电影 hipster夏历2222年,黑色的太阳突然从极渊升起,在天穹之上悬挂七日,全球陷入一片黑暗。 此次事件中,整条赤道全线崩坏,水蓝星裂开一道长达4万公里的影渊,横贯东西。 七天后,黑日退去,光明重洒大地。 可当人们欢呼灾难结束之时,却不知无尽的恐怖正从影渊之中醒来。 自此,全球复苏,百鬼夜行。 一代帝师,遭遇自己十位爱徒的背叛,复苏后彻底迈上魔道之路…… 刀劈帝宫镇四方,掌灭星辰踏踏苍穹,诸天万道群雄起,看尽英豪我为尊! 零号都市,那是一座只存在于档案中的都市。传说它拥有着远超当代的科技,还有着创造超能力者的技术。 而在2022的某一天,整个世界的天空都出现异象,超能力者开始在世界各地涌现,零都以及零都背后的秘密,开始展现在世人面前。 因为没有能力元而不能修炼的恒浩被家族抹杀后,意外生还,原本没有修为的自己只是想一辈子隐藏在这座山里,过着日常的生活,可那一天……在世界上的那一天,一股彩色的东西从地底涌上来,在那之后,世界都变了········班里的美少女转校生告诉我,我们已经被卷入了一场狼人杀游戏当中,随时会死? 可是......为什么我的狼人杀,画风不一样? 深夜,无人居住的房间里传出了诡异的声音, 黑暗的海洋馆深处传来了阵阵婴儿的啼哭声, 桃花盛开的小村庄在黑夜里露出了血色的獠牙...... 我能不玩了吗......神网那些事:从我的世界梦想之城起源,到成为第一超时空,无敌存在的完整故事,淋漓尽致的展现了最强体系的神网的诞生和特性。 干净清爽的第一人称爽文。 一小段番外: 那个光头男子看着眼前蓝光闪烁的盾法阵,第一次,他的拳头被拦住,无法前进分毫。我带着一丝轻蔑的笑:“你在你的宇宙中确实很强,但终究无法直接突破法则的束缚。”回答我的,是一个几乎能毁天灭地的拳头。同时,周围的空间,法则不稳定了起来。我皱起眉头,我可不想把这里搞的一团糟,AI法则混淆仪自动运转起来,开始修补破损的法则。拳头再次被星辉·盾挡住,不到一秒的时间里反复碎了几亿次,奈何每T数万层的构建速度太恐怖,拳头终究被阻挡下来。那男人见状,停了下来“无敌一定很寂寞吧。唉!”。我愣了几秒,当然是故意的,也叹息一声:“是啊。不过,我来可不是打架的。”看这他疑惑的表情,我嘿嘿一笑“愿意到我这里干活吗,最先进的建设岗位,收入大概你那一个月你那的九百亿。”(因为我想写一个夫妻档的故事,所以前面铺垫比较长。这个一个用秘术较量的世界。) 每日四更 友谊石小方是个很方正死板的人,说了不能妥协就是不能,说了不能少泡一个就是不能,一直以自己所能想到的各种无耻借口做着方正而死板的自己。但是现在的他很方,他只是个打算如方石一般横扫过人生这个终将有终点的大滑坡,怎么突然就告诉他,这个滑坡之下,是修真界这片汪洋大海呢? 俗世百年,我的钱呢?我的妞呢?我的七情六欲,你一片海就要我全丢了,去做你的定海神石?想得美呢吧老头子们!
武极瀚虚 零渡空间 大夏执剑人 丧尸海豹突击队队长 我的一米书屋 仙门大师兄 少年时之九零后 灾难天启 万古第一神 玄幻,我要诛了这三界! 我不止是个御兽师 后室 明月惊鹊 暗夜中回望花海的少年 心中锄头手中刀 请 神 宗门里除了我都是卧底 剑灵之洪门传说 卦灵路 末世,但是主角是苦逼 凯特温斯莱电影 同志电影看巴士 迅雷下载 美国电影穿越时空的爱恋 电影世界之爱上中文 凯特温斯莱电影 中国监狱 电影 电影刹车 观看电影马背放映队心得体会 漫威电影大冒险 韩国电影 hipster 电影浪潮经典台词 电影浪潮经典台词 青萍果电影范冰冰 同志电影看巴士 迅雷下载 有关泼水节传说的电影 触不可及电影对白 刘德华想演相声艺人的一生的电影 漫威电影大冒险 电影崩溃迅雷下载 电影 钢琴教师 伊斯坦布尔的故事+2005+电影 奥特物所有电影 没有明天 电影 台湾电影搞笑 观看电影马背放映队心得体会 青萍果电影范冰冰 漫威电影大冒险 没有明天 电影 电影崩溃迅雷下载 漫威电影大冒险 电影世界之爱上中文 伊斯坦布尔的故事+2005+电影 宫电影演员表 电影 钢琴教师 青萍果电影范冰冰 触不可及电影对白 小川美那子电影下载 迅雷下载 电影刹车 青萍果电影范冰冰 小川美那子电影下载 迅雷下载 触不可及电影对白 炫电影在线 邻居电影版 刘德华想演相声艺人的一生的电影 阶级斗争老电影 伊斯坦布尔的故事+2005+电影 电影浪潮经典台词 触不可及电影对白 时机 电影 韩国伦理电影网盘 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 重返奥德赛 吾本凡胎 帝君转生成女孩 化邪途 我的师傅茅十八 欧博官网 亚星管理平台 澳门葡京游戏官网 欧博官网 亚星游戏官网 电影崩溃迅雷下载 台湾电影搞笑 台湾电影搞笑 漫威电影大冒险 中国监狱 电影 大瓜电影网 没有明天 电影 柏林电影节截止日期 时机 电影 小川美那子电影下载 迅雷下载 冷风电影 大瓜电影网 伊斯坦布尔的故事+2005+电影 美国电影穿越时空的爱恋 电影世界之爱上中文 没有明天 电影 韩国电影 hipster 邻居电影版 邻居电影版 凯特温斯莱电影 漫威电影大冒险 大瓜电影网 电影崩溃迅雷下载 电影刹车 青萍果电影范冰冰 奥特物所有电影 韩国电影 hipster 电影浪潮经典台词 伊斯坦布尔的故事+2005+电影 韩国伦理电影网盘