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
欧美群迅雷下载邮票交易所龙邮票邮票互动网邮票收藏十二生肖邮票邮票网上海邮票网邮票收藏奥运邮票【文娱+单女主+狗粮+日常】 刚和明星老婆离婚,林舟便意外成为了当红小天后的私人男助理。 恰逢穿越记忆复苏,林舟没有意外的开始当起文抄公。 然后,传说中的天后背后的那个男人上线了! 二线歌手前妻:“林舟是个不错的男人,可惜他太平庸,不能在事业上帮助我。” 国民女神.绝美腿精.超级天后:“如果没有遇到林舟,我绝不可能有今天的成就!太感谢他的前妻了,把这么优秀的男人送到了我身边!” 前妻:“?” 林舟:“我只是个私人助理,什么金牌词曲人、白金编剧、大导演、征服冰山女神的男人……这些都和我没关系,真的!” “好黑啊,这里是哪里,我怎么睡着了?” 苏恒感觉头脑昏昏沉沉的,眼前一片模糊朦胧,却浑然不知自己在何处。 “醒来。” 耳朵里听到的这两个字仿佛如同撞钟一般深深撞击着心脏,苏恒感觉浑身发烫,原本黑暗的世界开始出现了裂缝,光明开始钻进黑暗的空间中。 在黑暗中呆久了,第一缕霎那间的白昼便如同滚烫的沸水浇灌入眼睛,皮肤也变得痛痒难忍,这一切持续了好一阵苏恒才适应下来。 23世纪已经来到,这世上流传这异世界的传说,我林萧,我的爷爷曾给我说过,他去过异世界。我原本以为这仅仅是个传说,可没想到有一天,国际联盟探险队和国际研究所找上我的爷爷,说异世界与我们断开了联系,此时,我才明白异世界是真的。I am god! 无知凡人们,献上你们的膝盖吧! 那一天,得知世界真实的辰桓定下一个小目标,成为这世间第一个神! 于是乎,受命于天的他带着上天的馈赠,开始了他收集打工人的历程。 古玩就是贩卖历史。 这话是我爸对我说的,那个时候我只有7岁,懵懵懂懂,完全不明白是什么意思。 直到后来,我才知道古玩贩卖的不只是历史…… 还有故事!有没有想过三国时代最根源是从哪里来? 天下大势? 合久必分? 有没有想过是汉末第一导演袁绍谋篇布局了非常精妙的189年东汉皇权大崩塌...幼儿园抢饭第一名 ,素质教育的漏网之鱼,已读不回专业户 .著名奶茶鉴定家 ,国家精准扶贫项目重点帮扶对象 2022年全国高考状元老乡!作者的感触录穿越到修仙世界,希望能活下去。一言定生死,一语变乾坤。李明不敢相信这个世界真的存在妖、魔、鬼、怪,神,更没想到世界上真的有地方联盟专门维持着世间的秩序,和各种族间的平衡,并且因为一部手机,李明成了他们中的一员.....
民居邮票 中国邮票 中国邮票 民居邮票 邮票图片 世界上第一枚邮票 邮票吧 大龙邮票 南京文交所钱币邮票交易中心 南京文交所钱币邮票交易中心 中国邮票 民居邮票 猴年邮票 邮票价格 上海邮票网 邮票图片 十二生肖邮票 邮票收藏 邮票吧 邮票网 邮票行情 邮票 香港回归纪念邮票 中国邮票价格表 文革邮票 香港回归纪念邮票 邮票行情 猴年邮票 邮票收藏价格表 大龙邮票 民居邮票 邮票吧 鸡年邮票 文革邮票 邮票 香港回归纪念邮票 邮票吧 鸡年邮票 邮票价格 中国邮票价格表 血僵魔君热血警察天梦神阁图书馆我只想毁灭世界的啊阳春暮雪黄帝内经续重生离婚当天,我成了宠妻奶爸龙绝天绝重生85:财富人生笑展乾坤我被要求和双马尾少女同居重生之少年狂想重生全能系统天之骄子龙之爪牙剑眼最强仙帝在都市非同寻常的治疗乱天圣主渡尘,登仙神帝历情劫亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星游戏官网 亚星官网 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 快连官网 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快连VPN 亚星游戏 亚星国际