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
洛阳9月12日天气2016.10月襄阳天气北安天气30天天气新安天气特点新安县历史天气查询洛阳9月12日天气中国天气网浙江现在天气北安天气30天天气咸安区近15天天气武汉 十月天气预报预报天气洛阳北安天气30天天气武汉7至9月天气情况预报天气洛阳北安天气30天天气武汉 十月天气预报武汉7至9月天气预报以前 洛阳的天气新安县历史天气查询洛阳2月7号天气咸宁10月天气预报15天天气预报以前 洛阳的天气咸安区近15天天气九月二十五蚌埠天气新安天气温度湿度2016十一襄阳天气新安天气温度湿度十一月天气吉林洛阳2月7号天气中国天气网河南实况监测何须问,浮生情,原知浮生是梦中。 花落花开,人死只是重生的开始。 广袤无垠的具象大陆,具象者们,打通三脉七轮,修炼着脉气。 根轮开,红莲绽放,具象现: 腹轮开,橙莲绽放,具象量变: 脐轮开,黄莲绽放,变化现: 心轮开,绿莲绽放,生命现: 喉咙开,蓝莲绽放,灵性现; 额轮开,紫莲绽放,智慧现: 顶轮开,千瓣莲花,彩虹现。 红十具象师,橙百具象师,黄千具象师,灰迷具象宗师,绿生宗师,蓝灵宗师,紫归宗师,彩虹尊者。 生命之花,如此璀璨,如果可以,我愿奉献!三年前,大婚之日,他遭人暗算,被人投江。   三年后,他脱胎换骨,再临故地。   这一次。   他绝不会再让任何人主宰自己的命运.....一觉醒来,这个世界再也不是熟悉的那个车水马龙的样子,纷乱的战火,各色的超能力,这是干嘛啊!觉醒了SSS级别的超能力,我是奶妈?不,我这是圣职者,惩戒与祝福才是我的专长,那个劳什子治疗,只是我附带的能力罢了! 音起人心合,音落山河断,音乐可以抚平世界的创伤,于是天下便有了一种特殊的行业--音师。不同于乐师的音乐,他们用灵魂来奏乐,用生命来抚平世界的伤痛。 没有天魂的废物,十分的喜欢音乐。 明知自己无法修炼,却在天魂觉醒仪式上立下豪言壮志:“我姜灵,虽然没有什么修炼天赋,但我的目标也不会被世界改变,我要做的是改变世界。”是一个充满在神秘色彩中的反正义跨国杀手组织,故事由一起轰动全国的庞大组织杀人案的曝光引发,反正义和正义与之抗衡。李天命做梦都要笑醒了。他家的宠物,竟然都是传说中的太古混沌巨兽! 他的家鸡,是以太阳为食的‘永恒炼狱凤凰’。 他的黑猫,是以雷霆炼化万界的‘太初混沌雷魔’。 连他家的小强,都是拥有万亿不死分身的‘万界永生兽’…… 从此,他驾驭十头太古混沌巨兽,化身万古第一混沌神灵,周游诸天万界,镇守无尽神域。万物魔灵,诸天邪魔,连爬带滚,哀呼颤抖! 江湖是一张密密麻麻的网,上面尽是各式各样的奇人。 痴迷做菜的老厨子,袍下有七把刀,名为北斗七星。 千里寻师的小徒弟,袖里藏着一蓑烟雨。 拎着巨锤的打铁少女,扬言自己挥的是刀法。 满腹牢骚的穷酸书生,天天提笔着墨,练习他那永州八“贱”。 而我们的主角,一个奇经八脉被封的废柴,偏要逆天学武,带着一只腹黑毒舌的狐狸,独自踏上遥远的复仇之路。一人一尺,纵横天下。 横亘八荒,竖劈九州,驰骋六界,傲然封神。一个驻外星小士兵,偶得可以进化的智慧程序,跨入宇宙,逐渐接触到高等级文明,打造高端武器与战舰,血战星海,播撒炎黄民族神威。 本书为纯粹的科幻,预计四百万字,没有狗血剧情,没有打脸公式,仅有不断攀升的战斗智慧与铁血勇气。后金铁骑灭宋,历史拐弯进入刘氏文朝。文昭帝五十二年,内忧外患,左相专权当道,宗室萧墙。腐朽将倾,灭国亡种露端倪。 懦弱书呆子杨继业在荆蛮楚地意外转性,文武并行,带领蛮族军一路前行。破山贼、剿倭寇、东控海贸、北撼蒙匈;内权肃奸、强兵兴武,皇权进村,国富民安,成就权相伟业,华夏一族登临世界之巅。 架空历史+商战+官场+战争+崛起是我DIO啦
执梦绘权 二次元之我的系统有点妖 缆镇语录 猎魔:美味佳肴 同世而立 灵域时代 当我变成了女生的这档事 雪啸炎海 大国重器智能时代 当码农遇上系统 佐传 再上昆仑 极品公子 十二次轮回 灾变降临:我能模拟生存率 逆袭1990 心理历程 诡秘怪异的世界 洪荒:我红云,就喜欢做好事! 原神:开局和胡桃签订契约 2016十一襄阳天气 中国天气网 郑州 武汉十月一二号天气预报 新安县历史天气查询 2016.10月襄阳天气 十一月天气吉林 武汉十月一二号天气预报 武汉11月20日天气预报查询结果 2017年10月3日襄阳天气 武汉7至9月天气情况 武汉十月一日天气天气预报 武汉十月一日天气天气预报 九月二十五蚌埠天气 中国天气网 郑州 洛阳9月12日天气 新安县历史天气查询 武汉十月一二号天气怎么样 2016十一襄阳天气 2015年1月天气洛阳 北安天气30天天气 中国天气网 郑州 北安天气30天天气 2015年1月天气洛阳 以前 洛阳的天气 武汉 十月天气预报 洛阳2017年9月天气记录 2016十一襄阳天气 2015年1月天气洛阳 2015年1月天气洛阳 2017年10月3日襄阳天气 新安县历史天气查询 中国湖北武汉天气预报查询 新安天气特点 洛阳9月12日天气 九月二十五蚌埠天气 新安天气温度湿度 新安天气特点 武汉十月一二号天气预报 九月二十五蚌埠天气 襄阳市9月1日天气 新安天气温度湿度 武汉11月20日天气预报查询结果 洛阳2月7号天气 武汉十月一二号天气怎么样 预报天气洛阳 中国湖北武汉天气预报查询 武汉十月一日天气天气预报 新安天气温度湿度 洛阳2017年9月天气记录 武汉7至9月天气预报 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 穿越诸天从梦幻西游开始 枫起云涌时 一条舔狗的使命 创世修心决 蜀山轶事 万利官网 欧博官网 百家乐官网 万利官网 欧博官网 新安县历史天气查询 新安天气温度湿度 九月二十五蚌埠天气 武汉7至9月天气预报 咸安区近15天天气 洛阳2017年9月天气记录 洛阳2月底天气 洛阳2017年9月天气记录 武汉11月20日天气预报查询结果 洛阳2月7号天气 襄阳市9月1日天气 中国天气网 郑州 2017年10月3日襄阳天气 2015年1月天气洛阳 新安天气温度湿度 中国天气网河南实况监测 武汉十月一二号天气预报 武汉7至9月天气预报 预报天气洛阳 十一月天气吉林 洛阳2月底天气 武汉十月一二号天气预报 中国天气网 郑州 预报天气洛阳 2015年1月天气洛阳 中国天气网 郑州 武汉7至9月天气情况 咸安区近15天天气 武汉7至9月天气情况 襄阳市9月1日天气