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
酷酷小猫图片大全日本动漫帅气冷酷男生图片大全清新的图片素描图片大全清新美女白图片大全可爱图片大全图片大全可爱卡通夏天图片大全酷酷小猫图片大全情侣狗可爱头像图片大全可爱图片清新的图片素描图片大全情侣头像音乐动漫图片大全唯美情侣背影高清唯美头像图片大全可爱猫图片带文字图片大全可爱图片大全集清新的图片素描图片大全美女头像霸气带字图片大全可爱猫图片带文字图片大全可爱图片大全集清新简单的情侣头像图片大全可爱图片情侣背影高清唯美头像图片大全老人可爱头像图片大全集可爱莲花图片手机壁纸高清图片大全可爱卡通夏天图片大全美甲高清图小清新图片大全图片冷酷女神美少女图片大全可爱莲花图片手机壁纸高清图片大全情侣头像音乐动漫图片大全唯美日本家中国图片大全图片大全图片搜索可爱机器人头像图片大全卡通没有伞的女人图片大全可爱机器人头像图片大全卡通日本家中国图片大全图片大全图片搜索美甲高清图小清新图片大全图片美女头像霸气带字图片大全 一枚丹药如何拯救世界?周九天一个赘婿之子,如何逆风而行?一曲长歌动天下 一剑光寒十九州 救苍生,斩邪魔 宋鸾不负天下人异能者的觉醒,使人类面临着悬崖上的抉择。 强权与堕落,腐朽与血腥,谁来拯救混乱中的大陆? 一枚少年。 一个系统。 一句真言。 “沈昱辱我清白之身,还请沈家给我李家一个公道!” “身为沈家世子,犯下此等恶劣罪行,汝可知错?” “欲加之罪何患无辞!” “证据确凿,汝犯下此等滔天罪孽,还不认错,罪加一等!” “罚你禁足三年,将汝之罪行,昭告天下!” 枪挑万古,游戏人间,一人一枪,纵横万界,一怒为苍生,一怒为红颜。一个宅男穿越到日本战国时代,逢凶化险,不断适应成长的历险故事。茫茫宇宙,点点繁星。名不经传,却塑造了一位超级无敌大剑修!!古蓝星,只是一个边陲宇宙,却是叶泽从小赖以生存的家园。家人相继离去,担子只能由年幼的自己扛!睡梦中醒来,改变了命运,一剑在手,天下我有!!我有一剑,可破诸天!!!!“我本无名,只能叫无名了。在我心中,若失去冒险精神就失去了人生意义,那种热血沸腾的感觉真是让我欲罢不能!” 神秘少年获得与所在世界格格不入的力量,由于好奇心的驱使让他四处冒险,奇遇连连,随着身体与武器接连产生异变,他那恐怖的身份以及武器的归属渐渐有了答案……都说庶子与家产无缘,但林弘却不这么认为,看上的东西,不给就抢,才是王道……拥有【满级肉身】的苏叶,穿越异界,成为显魔宗疯魔院的杂役弟子! 被女魔头吊着打,获得天魔神掌。 被老魔头拿头撞,获得种魔大法。 被小魔头当沙包,获得霸王神斩。 …… 在疯魔院当杂役这些年。 有郁郁寡欢的师妹,来疯魔院供奉魔头,经苏叶指点,修成九世女帝! 有身世卑微的凡人,来疯魔院供奉魔头,经苏叶调教,成为天下共尊的魔皇! 有朝廷弃徒的皇子,来疯魔院供奉魔头,经苏叶点拨,成为横扫大陆的一代帝王! * 六十年后,魔道天榜揭示,排序魔道强者,苏叶独占鳌头! 榜单备注——神魔共主! ……
元宇星空 大师兄不想太招摇 奇怪侦探所 远望2020之重回1982 龙吟五洲 网游之屠龙勇士 从不良人开始牧马 我在诸天称无敌 本公子讲歪道理,你讲什么 破天机系列之困天迷龙局 我的倾城大小姐 小白龙大战沿河城 十万年人神魔录 我心中所想的宇宙 灵异复苏:世界崩坏五十年 游戏系统从传奇开始 古灵帝君 魔格星囚徒 玄幻:我,天命大主角 星际大帝洛一凡 猫咪晚安睡觉图片大全可爱图片 情感女生图片大全 老人可爱头像图片大全集 可爱卡通夏天图片大全 猫咪晚安睡觉图片大全可爱图片 没有未来文字图片大全 老人可爱头像图片大全集 情侣带爱情的字头像图片大全唯美 没有伞的女人图片大全 拉布拉多母图片大全可爱 我的世界人的图片大全 我的世界人的图片大全 美的公园图片大全 情感女生图片大全 酷酷小猫图片大全 可爱卡通夏天图片大全 老人像小孩图片大全 猫咪晚安睡觉图片大全可爱图片 人物素描画图片大全简单图片 清新的图片素描图片大全 情感女生图片大全 清新的图片素描图片大全 人物素描画图片大全简单图片 可爱莲花图片手机壁纸高清图片大全 情侣背影高清唯美头像图片大全 美的公园图片大全 猫咪晚安睡觉图片大全可爱图片 日本动漫帅气冷酷男生图片大全 人物素描画图片大全简单图片 没有伞的女人图片大全 可爱卡通夏天图片大全 可爱名字贴简笔画图片大全 清新美女白图片大全可爱图片大全图片大全 酷酷小猫图片大全 日本家中国图片大全图片大全图片搜索 可爱机器人头像图片大全卡通 清新美女白图片大全可爱图片大全图片大全 老人可爱头像图片大全集 美的公园图片大全 清新简单的情侣头像图片大全可爱图片 可爱机器人头像图片大全卡通 情侣带爱情的字头像图片大全唯美 扣扣情侣名片图片大全 老人像小孩图片大全 可爱猫图片带文字图片大全可爱图片大全集 可爱名字贴简笔画图片大全 我的世界人的图片大全 可爱机器人头像图片大全卡通 美的公园图片大全 情侣美女帅哥接吻图片大全 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 DG时代 质检女神:开局检查焰灵姬 金庸世界里的至尊无赖 都市修真:至臻魔体 天宇守护神医 万利官网 欧博官网 皇冠登3出租 万利官网 欧博官网 老人像小孩图片大全 美的公园图片大全 清新的图片素描图片大全 可爱名字贴简笔画图片大全 清新的图片素描图片大全 美甲高清图小清新图片大全图片 清新美女白图片大全可爱图片大全图片大全 冷酷女神美少女图片大全 猫咪晚安睡觉图片大全可爱图片 人物素描画图片大全简单图片 可爱莲花图片手机壁纸高清图片大全 清新简单的情侣头像图片大全可爱图片 可爱莲花图片手机壁纸高清图片大全 情侣狗可爱头像图片大全可爱图片 老人可爱头像图片大全集 可爱莲花图片手机壁纸高清图片大全 美甲高清图小清新图片大全图片 老人可爱头像图片大全集 情侣头像音乐动漫图片大全唯美 我的世界人的图片大全 情侣带爱情的字头像图片大全唯美 情感女生图片大全 人物素描画图片大全简单图片 酷酷小猫图片大全 清新美女白图片大全可爱图片大全图片大全 清新简单的情侣头像图片大全可爱图片 没有伞的女人图片大全 拉布拉多母图片大全可爱 老人可爱头像图片大全集 没有未来文字图片大全