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
富贵笔人txt下载穿越女碰到穿越男txt行尸走肉之生存法则txt首席的亿万新娘txt下载异能纪元txt下载花魁称后txt下载涂九txt行尸走肉之生存法则txt江山不悔txt下载网王青色年华txt下载娘山108星少女之财星高照txt下载富贵笔人txt下载天谴修罗txt下载霸海风云txt全集下载行尸走肉之生存法则txt网王青色年华txt下载雇佣天价老婆txt下载幻想世界游记txt下载幻想世界游记txt下载檀香美人谋txt新浪幸福txt幻想世界游记txt下载江山不悔txt下载天帝魂尊txt异能纪元txt下载魔鸥txt下载首席的亿万新娘txt下载天帝魂尊txt南湾茶暖女王归来txt天谴修罗txt下载伏尸千里,白骨成山,他站在山巅俯视众生…… 为朋友他可散尽家财,为道义他愿舍弃荣华,为国家能南征北战,为爱人他敢血洗黄沙…… 让我们追随旷世战神甄开心的步伐,一起斗恶霸、杀贪官、斩尸鬼、灭厉魂……欢迎阅读看破风云,风起云涌,修真者被害穿越到武侠世界,众美女如云,长相思伴,看他如何踏破 虚空,称霸武林,独领风骚 。枫立天是我的小学同桌,今年六月,我在学校里用一个日记本写一本小说,在班里特别有名,粉丝有十几,有一天放学,枫立天来找我,他帮我在网上更小说,六月末,我加入了17K,但他并没好好更,还删改内容,让我很失望,我只能把原本的拿出来更本书源自一段驻村工作经历改编!十弟出生时,是家中第10胎,他有9个姐姐,1个弟弟。漂亮的母亲险些被抓去结扎,在激烈对抗中,镇计生专干要求这夫妇必须结扎一个,父亲霸气地向计生专干组要了十五分钟,随即跟上计生专车去了医院…… 十个月后,林家第11个孩子出生了,男孩!回顾粤地初开,广信大地一幕幕的河山足迹,是华夏文明生生不息的延续! 本故事纯属虚构!一个公布于天下,被豪门家族抛弃的弃子。另一面却是玩世不恭的纨绔少爷却忍辱入了赘婿,然后如何转变 创造他的商业传奇。。。。。无敌天骄, 神魔血脉, 吾持一剑,碾天骄,镇神魔, 一剑碎山河,破九天,通万古……谁说修仙一定是人,谁说冷血不适合修仙,白蛇凭刻苦努力不断升级修炼本书可能有一些MOD与事实不符,不好勿喷上一世,他出道八年,却无人问津,老婆抛弃他,女儿因为癌症去世,穷困潦倒,妻离子散。 一朝回到女儿去世前,再次见到女儿的那一刻,他决定,要将全世界最好的都给女儿。 为了赚钱养女儿,一不小心,他唱的歌爆红了网络。 写的第一本小说就被称之为经典。 拍的第一部电影就成了电影学院研究的对象。 …… 当事人叶鸣却抱着怀中的女儿淡笑道:“意外,这都是意外,我只想做个好奶爸而已。”
长平长平 大唐:苟了十六年,被武则天曝光了 虚无之诸世界 父子硬核闯万界 千变修罗 天帝的自我修养 都市之我最厉害 成为恶蛟加点修仙 全民震惊,你管这叫贫困户? 幕后:戏耍气运之子 侦破t 九幽练魂决 众与世界 轮回上限 迷案追凶 地府直播日常 万族之劫:我觉醒了神相 灾难天启 骨董江湖 界阙 巨匪txt下载 80txt电子书免费下载全集全 雇佣天价老婆txt下载 幻想世界游记txt下载 巨匪txt下载 抱上空姐大腿txt 盛爱新婚txt 英雄联盟之路人王txt下载 魔鸥txt下载 天谴修罗txt下载 江山不悔txt下载 机战女王成长史txt 萨拉弗的龙翼挽歌txt全集下载 网王青色年华txt下载 花魁称后txt下载 异能纪元txt下载 盛爱新婚txt 魔鸥txt下载 幸福txt 富贵笔人txt下载 80txt电子书免费下载全集全 行尸走肉之生存法则txt 穿越女碰到穿越男txt 霸海风云txt全集下载 网王青色年华txt下载 萨拉弗的龙翼挽歌txt全集下载 魔鸥txt下载 穿越女碰到穿越男txt 幸福txt 魔鸥txt下载 异能纪元txt下载 80txt电子书免费下载全集全 激荡三十年 txt下载 富贵笔人txt下载 天帝魂尊txt 异能纪元txt下载 激荡三十年 txt下载 雇佣天价老婆txt下载 萨拉弗的龙翼挽歌txt全集下载 行尸走肉之生存法则txt 首席的亿万新娘txt下载 另一种邂逅txt新浪 檀香美人谋txt新浪 机战女王成长史txt 霸海风云txt全集下载 80txt电子书免费下载全集全 机战女王成长史txt 首席的亿万新娘txt下载 南湾茶暖女王归来txt 涂九txt 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 私家侦探之小人物 回归纪元 电竞之路:昂狮 十国战歌 玉过添琴 亚星游戏官网 万利官网 欧博游戏官网 亚星官网 葡京官网 霸海风云txt全集下载 另一种邂逅txt新浪 巨匪txt下载 南湾茶暖女王归来txt 网王青色年华txt下载 魔鸥txt下载 涂九txt 花魁称后txt下载 幸福txt 霸海风云txt全集下载 霸海风云txt全集下载 魔鸥txt下载 抱上空姐大腿txt 忽然之恋txt免费下载 檀香美人谋txt新浪 天帝魂尊txt 幻想世界游记txt下载 激荡三十年 txt下载 美漫反英雄txt下载 南湾茶暖女王归来txt 80txt电子书免费下载全集全 雇佣天价老婆txt下载 幻想世界游记txt下载 幸福txt 天谴修罗txt下载 霸海风云txt全集下载 南湾茶暖女王归来txt 巨匪txt下载 魔鸥txt下载 江山不悔txt下载