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图片大全图片大全黑白餐厅图片大全2015图片大全图片大全可乐二字图片大全接吻素描铅笔画 素描图片大全图片大全图片大全图片大全黑白餐厅图片大全2015图片大全图片大全可爱婴儿卡通头像图片大全可爱图片大全图片可爱真人少女头像图片大全喜欢你表情图片大全口味图片带字图片大全集喜欢你表情图片大全可爱真人少女头像图片大全可乐二字图片大全小学女生发图片大全图片大全图片大全五行剑,五把剑,这里讲的是一些怎样的故事呢? 人皮模特、人骨拼图、凶宅奇案、真人蜡像、密室杀人、碎尸惨案…… 这些故事背后是怎样的一群人呢? 囚禁者、恋物癖、人格分裂、流浪汉、乞丐、白领、高智商人群…… 我叫秦沐,一名从业七年的刑警,隶属公安厅重案组。 我从没有想过,有一天我会站在地狱仰望天堂。也许只有这样,我才能真正听懂来自地狱深处的哀鸣。 在我经历的一个个看似荒诞不经的故事背后,都是一张张丑恶的嘴脸。 本小说及人物纯属虚构,请勿对号入座。如有雷同,纯属巧合,切勿模仿。刘阳三岁被一对不孕夫妇收养,同时被收养的同龄妹妹刘晨与他一起进入刘家,却因天生怪病被另眼相看,这般悲惨命运却被一位白发神医华佗扭转......作为旁观者,记录六段也许并不普通的故事;作为等待者,是否能等待重逢的那日。这是恩怨的了解之章,也是六条截然不同的道路。一个王者的职业梦 ,一个平凡男生守护女友的愿想。一个为了胜利可以牺牲自己的玩家。 一个怀揣梦想却无能为力的大龄青年重新回到18年,势要改变自己的命运。 从校园到主播,从主播到职业选手。 人生只不过是我们死之前的一点回忆。能否改变人生,不是从回忆里去改,而是从现在去改变。决定你未来命运的不是过去做过什么,而是你现在正在做什么。摆脱宿命的安排,挣脱命运的枷锁,打破这一切的双手长在我们自己身上。 天尊轮回,一个懵懂少年入踏入修仙路,不求长生,只为真我,寻找前世爱妻,解开前世之谜,打破今世枷锁,成就今世威名,改变天地法则,重塑未来。一步步成长为天地至尊回归真我。 当站在修炼之巅,蓦然回首,才懂得,上天注定的是一个结果而不是过程,由你做主的那部分是上天赋予你的权力,但最终谁也改变不了那个结果,人生只是一个自我认识,追求真我的过程,一场我们自己主宰的梦而已…………更多精彩请持续关注本书。自推背图出世以后,皇朝不再是一个人的天下。江湖风云变换,但是江湖人都在驱动着时间的齿轮,使得江湖令变得接近永恒。李志德作为唐王的后人,一直希望寻回江湖令,重建大唐盛世,但也对现在国家充满了信心,······坐胯守元,练就不朽神话; 天地无极,怎奈我赤子之心; 诸天万界,定当逍遥!巅峰神王唐三为了找回不幸陨落的妻子,依然选择跟随妻子一同转世重生。他和转世的妻子之间会发生什么趣事,唐三又会如何在异世书写自己的不朽传奇呢?石灵日久变成一个玉梅树,不断因为各种各样的情况,死亡,穿到另一个新世界。逐渐变强修炼。
以凡入道决 大奉金店 洪荒:通天!你徒弟又作死 遇鬼的那些年 神医小村民 我在修真世界当黑道 死灵德鲁伊 风火盐城 上门猛婿 世界灭绝之日 重生剑圣传 冰河世纪后 吞天帝仙 震惊!我获得物理驱鬼系统 诸天万界之神级商人 大秦:千古一帝,从道祖开始! 开局被判诛九族,贵妃娘娘 阴阳界之仇仙 鬼镜夜探 民间故事诡异 可以动的动漫图片大全图片欣赏 画卡通人物头像图片大全大图 非主流好看的女生头像带字图片唯美图片大全 下雨天洗澡图片大全 可以动的动漫图片大全图片欣赏 哭了如何文艺的说说带图片大全 非主流好看的女生头像带字图片唯美图片大全 长发男性动漫图片大全 口味图片带字图片大全集 小猫的种类图片大全 简约复古动漫图片大全 简约复古动漫图片大全 可爱猪文字图片大全可爱图片 画卡通人物头像图片大全大图 卡通吃东西的图片大全 下雨天洗澡图片大全 带霸气字图片女生头像背影图片大全 口味图片带字图片大全集 经典的字图片大全集 卡通吃东西的图片大全图片大全 画卡通人物头像图片大全大图 动漫兔子头像高清头像图片大全 动漫男男结婚图片大全图片大全图片 黑白卡通公主图片大全 古装演员图片大全图片大全图片大全图片欣赏 可爱猪文字图片大全可爱图片 口味图片带字图片大全集 动漫男男结婚图片大全图片大全图片 经典的字图片大全集 口味图片带字图片大全集 下雨天洗澡图片大全 像雨伞类的图片大全 和朋友干老婆图片大全 卡通吃东西的图片大全 可爱真人少女头像图片大全 下雨天洗澡图片大全 和朋友干老婆图片大全 非主流好看的女生头像带字图片唯美图片大全 可爱猪文字图片大全可爱图片 动漫兔子头像高清头像图片大全 喜欢你表情图片大全 小猫的种类图片大全 卡通qq照片墙图片大全 带霸气字图片女生头像背影图片大全 黑白卡通公主图片大全 画卡通人物头像图片大全大图 简约复古动漫图片大全 喜欢你表情图片大全 可爱猪文字图片大全可爱图片 四叶草意境图片大全 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 冲出二次元 飞升从家族修仙开始 异世界转生体: 临踏仙途 异界牛马 欧博官网 亚星官网 万利游戏官网 亚星管理平台 澳门葡京游戏官网 可以动的动漫图片大全图片欣赏 哭了如何文艺的说说带图片大全 卡通吃东西的图片大全 长发男性动漫图片大全 带霸气字图片女生头像背影图片大全 黑白餐厅图片大全2015图片大全图片大全 小学女生发图片大全图片大全图片大全 和朋友干老婆图片大全 简约复古动漫图片大全 画卡通人物头像图片大全大图 可爱真人少女头像图片大全 哭了如何文艺的说说带图片大全 接吻素描铅笔画 素描图片大全图片大全图片大全图片大全 经典的字图片大全集 非主流好看的女生头像带字图片唯美图片大全 简约复古动漫图片大全 笑的最美的女孩图片大全 口味图片带字图片大全集 卡通qq照片墙图片大全 古装演员图片大全图片大全图片大全图片欣赏 非主流好看的女生头像带字图片唯美图片大全 可爱猪文字图片大全可爱图片 口味图片带字图片大全集 笑的最美的女孩图片大全 卡通qq照片墙图片大全 接吻素描铅笔画 素描图片大全图片大全图片大全图片大全 黑白餐厅图片大全2015图片大全图片大全 黑白餐厅图片大全2015图片大全图片大全 可以动的动漫图片大全图片欣赏 口味图片带字图片大全集