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
正视差距作文英语四级作文从句正视差距作文英语作文有哪些过渡句遗憾也美作文700字优秀的作文开头大全艺考生整容作文浙江省语文高考作文题英文作文clothes浙江省语文作文英语作文电子书的利弊正视差距作文浙江省2017年高考作文医生给的幸福作文500字浙江省语文高考作文题浙江省语文作文照片中的故事作文300英语作文购物从句英语作文购物从句以美好的回忆写作文英语满分作文范文英语作文购物从句英文作文clothes英语作文常见原因句型遗憾也美作文700字在勇敢中成长作文英语作文有哪些过渡句英语作文常见原因句型以美好的回忆写作文浙江省2017年高考作文这是一部通过讲述男主人公千万富豪李四,从离婚前发生的婚外情和婚外恋,到再也无法忍受家中的河东狮吼而选择离婚,再到离婚后追寻理想化爱情、不断相亲,再到历经一番又一番的波折后,再次走向婚姻这一过程中发生的系列不可思议得、啼笑皆非的无厘头婚恋故事。从而借此反思当代人极其扭曲的爱情观及婚恋观,是一部语言流畅优美,可读性极强的现实题材小说。 恭喜绑定育儿成长系统 本系统因不可描述原因 受损程度78%,无法主动提供任何帮助 如遇危险请用爱感化对方 谢谢合作 简介?什么简介 作者已经被整疯了 哈哈哈 假的 假的 全是假的 去你的育儿系统啊啊啊啊!一次偶然的机会,韩羽得到天符宝典,从此走上了一条另类的修行之路—符修! 制神符!动九天! 父母情!兄弟义!红颜泪! 且看小小韩羽如何以符舞动九天! 修炼体系:炼体境、气海境、灵武境、玄武境、地武境、天武境、以及传说中的真武境。(每个境界分九级) 符修体系:灵符,玄符,圣符,尊符以及神符。(注:每种符分为三等上中下) 穿越后,楚京只想苟住反派值,回去继承家产。   岂料引起公愤,被仙女粉丝穷追猛打。   行行行,打上瘾了?爷陪你打个够!   雾缈圣女:大家误会了,那天是我自愿的。 天命骄女:楚京,只要你肯原谅我,做什么都行。   魔界女帝:嗯?谁敢欺负本尊的宝贝徒儿?   剑修女神:喂,给你个机会,娶本小姐回家! 万古灵兽:主人,请尽情契约我吧~~~~ 楚京:疯了吧!我可是大反派啊! 众女:住嘴!姐妹们把人抓住!一人用一天! 楚京:你们休想得逞!女人,只会影响老子拔刀的速度! 古神大陆自诞生以来便流传着一个传说,命运之门会在一个时代结束时降临,得见命运之门者,可以登临神境,进入命运之门者,可获永生。 …… 杨凡天生道骨,却被家主算计和爱人偷袭,落了个修为全失,道骨被夺的下场,正当奄奄一息时,遇到了曾经见过命运之门的鬼圣阴无虚,并夺了对方的一身机缘…… 境界划分:炼体、苦海、神宫、仙台、破虚、同体、大圣、大帝、半神、神……父母年老得子 思想观念落后 孩子极力表现自己 却没有等到母亲的肯定 两个人就相隔两界 喜欢山旅的哥俩穿越到原始社会新石器时代的东北,引领东北山林草莽野人的进步发展,勾连各个不同地域原始文明,重建华夏。见证世界同时期不同文明进展,考证那些传说。他是弃婴他是小保安他只有二百块。他用神鬼莫测的医术活人无数,他凭一身武功历经凶险,他最终得成伟业名利双收。平头小子苏禅,带着妹妹苏婉儿到处流浪,岂料命运不济,遭受恶人毒害,身中奇毒,静脉尽断,险些丧命。天不绝人之路,开启系统,提升修炼。一边复仇一边恋爱,顺便带妹修仙。每个人都有属于他的气运,而这股气运会在冥冥之中影响着他的道路与未来。 命中注定你是个主角,那么你就会走上属于主角的道路,哪怕你不愿意,也无法拒绝。 你唯一能选的,是决定这条路该怎么走。 喜剧型男主角,逗逼型男主角,热血王道男主角,在或者是悲剧型男主角? 他们有的选,但秦宇没有,因为他的气运不是什么主角,而是一个反派!纯粹的反派! 大哥!以前我没得选!现在我想当个好人啊!
我要花五年拯救宇宙! 大航海从竹筏开始进化 大武不良人 璃水的雪 生存班级 天朝之变 独自觉醒 世俗不可医 迦贡纪元 原子打印 重生为帝:开局就被骂诈尸 生死鬼瞳 无双重创 魔道大圣 我比灵气先复苏 触灵怪谈 尘世剑 瞎子剑仙,蜀山观像三百年 光与暗宇宙 特殊证人 以食品安全的英语作文 英语作文临死前想做的 照片中的故事作文300 遗憾也美作文700字 以食品安全的英语作文 英文作文日期 莠草为题的作文 英语中考作文8种加分句型 在勇敢中成长作文 浙江省2017年高考作文 英文作文clothes 英语选择性作文 有关慈母的作文题目 英语作文临死前想做的 优秀的作文开头大全 遗憾也美作文700字 莠草为题的作文 在勇敢中成长作文 英语满分作文范文 正视差距作文 英语作文临死前想做的 浙江省语文高考作文题 英语四级作文从句 医生给的幸福作文500字 浙江省语文作文 有关慈母的作文题目 在勇敢中成长作文 英语四级作文从句 英语满分作文范文 在勇敢中成长作文 遗憾也美作文700字 英语作文临死前想做的 英语作文背诵方法 优秀的作文开头大全 英语作文常见原因句型 遗憾也美作文700字 英语作文背诵方法 照片中的故事作文300 有关慈母的作文题目 浙江省语文高考作文题 英语作文有哪些过渡句 一年级种子的作文 有关食品安全英语作文 英语选择性作文 医生给的幸福作文500字 英语作文临死前想做的 英语选择性作文 英语作文有哪些过渡句 有关慈母的作文题目 艺考生整容作文 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 我不是箭神 军芒 成为天师 网游:乱世 我在大荒炼体成仙 百家乐官网 澳门葡京官网 葡京官网 百家乐官网 万利游戏官网 以食品安全的英语作文 在勇敢中成长作文 有关食品安全英语作文 正视差距作文 英语作文购物从句 莠草为题的作文 英语四级作文从句 一年级种子的作文 英文作文clothes 英语作文临死前想做的 在勇敢中成长作文 艺考生整容作文 正视差距作文 正视差距作文 英语作文常见原因句型 有关慈母的作文题目 英语四级作文从句 在勇敢中成长作文 赞美朋友400字作文600字 优秀的作文开头大全 遗憾也美作文700字 照片中的故事作文300 英语四级作文从句 英语作文背诵方法 英语选择性作文 英语作文电子书的利弊 以食品安全的英语作文 艺考生整容作文 正视差距作文 正视差距作文