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
温州语文中考满分作文五年级学校生活的作文500字五年级学校生活的作文500字我爱我的家人高中作文我爱校园作文三年级作文300字五年级心愿作文五百字.我中的荷兰作文450字五年级学校生活的作文500字文化理解 英语作文温州语文中考满分作文潍坊语文中考满分作文五年级学校生活的作文500字我眼中的荷兰作文50字潍坊语文中考满分作文我爱的节日作文春节温州语文中考满分作文我最喜欢花400字作文400字我的小长假去游玩作文我的小长假去游玩作文我家虎妈作文我们身边的事情作文400字作文400字作文我的小长假去游玩作文文化理解 英语作文我爱教师岗位作文素材我爱校园作文三年级作文300字文化焦虑.作文我的儿童节作文600字我爱教师岗位作文素材我家虎妈作文我眼中的荷兰作文50字名将蒙恬之后蒙冲,单骑勇闯匈奴腹地,率“阴山七骑”鏖战“漠南四鹰”。武帝登基,弃和亲,扫匈奴。 漠南之战,大将军卫青横扫千军。 河西之战,飞将军李广战死疆场。 漠北之战,骠骑将军霍去病封狼居胥。几十亿人被传送到了末世,活下去成为了所有人共同的目标。 苏东觉醒系统,不仅可以伪装成其他人,还可以伪装成丧尸或者是变异生物。 并从被伪装者身上,抽取物品或者能力。 伪装成散打冠军,获得自由搏击经验! 伪装成丧尸,找到成堆的物资! 伪装成变异生物,获得超强自愈能力! 在所有人都朝不保夕,艰难求生之时,苏东已经把自己的次元空间,建造成了生存基地。 优哉游哉的种田养殖、喝着红酒、吃着烤肉……数万年前天地初开,混沌污浊不堪,祖龙异,化,变得邪恶,天下黎明百姓苦不堪言,天降4位如神一般的存在,破开乱世,救天龙星于水火。作者白菜,不好勿喷,谢谢大夏龙朝经历八百年的沧海桑田:王权衰败、藩王割据、诸侯裂土、群英崛起。龙朝早已是名存实亡……寿宴之夜,家族覆灭,林逸辰侥幸逃生,阴差阳错之下顶替了新的身份进入了城主府,府内人人心怀鬼胎,互相倾轧,一场腥风血雨的权利斗争就此拉开帷幕,林逸辰凭借着一股狠劲和自身的实力,一步步的踏上权力和武力的巅峰,待得实力足够之后,走向为家人的复仇之路,殊不知他的身世却是如此的错综复杂,而那背后隐藏着一场更大的阴谋。。。。看似平静的世界中,有人身负法则之力,有序运转的法则之下,埋藏着鲜为人知的阴暗面……古玩就是贩卖历史。 这话是我爸对我说的,那个时候我只有7岁,懵懵懂懂,完全不明白是什么意思。 直到后来,我才知道古玩贩卖的不只是历史…… 还有故事!我是一头来自阴间的厉鬼,我要到阳间去,我要去阳间勾魂锁命,我要去阳间养百万阴兵,我要去阳间杀生前仇敌!林楚重生2005,高考结束,青春正浓。 他真没想过要重生。 所以,在这个本该意气风发的年纪,他迷茫了…… 是在学术领域取得傲人成就,还是于花丛之中肆意驰骋? 2005,一个不远,也不近的年代。 这个年代,似乎可以利用先知先觉,挣点小钱? 开个小店,做个游戏,搞个公司…… 蓦然回首,林楚发现,自己早已在沉浮的商海之中,主宰了乾坤!
绝剑神源 轮回系统之异界战神 极品兵王:龙之刃 玄幻:我,天命大主角 三轮车 赛尔号之英雄传说 红知了 末法时代:蓝星源石 玄元剑道 灵魂公司 九城进少 来自东方的21世纪神 尘间留不住 御祈师 记忆的冰箱 重修己道 都市神医奶爸 蛰尘 星海畅想 今天又是在师门垫底的一天 我爱的节日作文春节 文化理解 英语作文 我与我爸爸作文一百字 我中的荷兰作文450字 我爱的节日作文春节 我的儿童节作文600字 我爱教师岗位作文素材 我们身边的事情作文400字作文400字作文 我爱我的家人高中作文 五下节约水的英语作文 我家虎妈作文 我家虎妈作文 我的小长假去游玩作文 文化理解 英语作文 温暖如阳作文 我的语文老师中考作文 我给奶奶的爱作文 我爱我的家人高中作文 五年级心愿作文五百字. 温州语文中考满分作文 我们携手走过 作文 我爱校园作文三年级作文300字作文 五年级学校生活的作文500字 我最喜欢花400字作文400字 我们身边的事情作文400字作文400字作文 我的小长假去游玩作文 我爱我的家人高中作文 五年级学校生活的作文500字 五年级心愿作文五百字. 我爱我的家人高中作文 我中的荷兰作文450字 我们携手走过 作文 我眼中的荷兰作文50字 温州语文中考满分作文 我的小长假去游玩作文 我的语文老师中考作文 味道中考满分作文 我爱教师岗位作文素材 我的小长假去游玩作文 味道中考满分作文 我的语文老师中考作文 我喜欢的活动 英语作文 我们携手走进高中作文 我给奶奶的爱作文 污染环境的作文结尾 我们携手走过 作文 我家虎妈作文 我眼中的荷兰作文50字 潍坊语文中考满分作文 文化焦虑.作文 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 网游之恩怨几长 最是寂寞逍遥仙 震惊!我的金手指神明都慕了! 妄想命运夜 别把岁月留下 澳门葡京游戏官网 AG真人 快连下载 澳门葡京游戏官网 欧博游戏官网 我眼中的荷兰作文50字 五下节约水的英语作文 我与我爸爸作文一百字 味道中考作文600 我最喜欢花400字作文400字 我的儿童节作文600字 我们携手走进高中作文 文化焦虑.作文 我们携手走过 作文 我最喜欢花400字作文400字 五年级心愿作文五百字. 污染环境的作文结尾 我喜欢的活动 英语作文 我家虎妈作文 我喜欢的活动 英语作文 我爱校园作文三年级作文300字作文 味道中考作文600 我爱的节日作文春节 我爱校园作文三年级作文300字 我的儿童节作文600字 我爱教师岗位作文素材 我的语文老师中考作文 我爱教师岗位作文素材 我爱校园作文三年级作文300字 我家虎妈作文 我爱教师岗位作文素材 温州语文中考满分作文 我家虎妈作文 五年级学校生活的作文500字 我们携手走进高中作文