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 as part of Bootstrap is a 940px-wide, 12-column grid.

It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.

<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

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="span12">
    Level 1 of column
    <div class="row">
      <div class="span6">Level 2</div>
      <div class="span6">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>
Variable Default value Description
@gridColumns 12 Number of columns
@gridColumnWidth 60px Width of each column
@gridGutterWidth 20px Negative space between columns
@siteWidth Computed sum of all columns and gutters Counts number of columns and gutters to set width of the .container-fixed() mixin

Variables in LESS

Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.

How to customize

Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.

Staying responsive

Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.

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>

Responsive devices

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: 768px) { ... }
// Portrait tablet to landscape and desktop
@media (min-width: 768px) and (max-width: 980px) { ... }
// 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 hidding 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

Test case

Resize your browser or load on different devices to test the above clases.

Visible on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop

Hidden on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop
欧美男眼睛图片唯美图片大全大图地油灯图片大全欧美男眼睛图片唯美图片大全大图片大全宠物熊猫图片大全可爱图片大全图片下载穿的高跟鞋图片大全图片大全欧美男眼睛图片唯美图片大全大图黑色的猪动漫图片大全图片大全图片大全欧美男眼睛图片唯美图片大全大图片大全情侣睡觉动漫图片大全可爱微信外国头像图片大全拳皇图片高清图片大全图片大全欧美男眼睛图片唯美图片大全大图片大全绘画小白兔图片大全拳皇图片高清图片大全图片大全橙子头像图片大全微信外国头像图片大全黑色漂亮图案大全图片大全图片大全图片搜索手机自拍头像怎么好看图片大全穿的高跟鞋图片大全图片大全韩国女孩吃棒棒糖图片大全图片大全图片大全图片大全带杀字图片大全图片手机自拍头像怎么好看图片大全情侣睡觉动漫图片大全可爱情人节情趣图片大全初音未来水中高清图片大全猴子图片大全集初音未来水中高清图片大全狐狸和小鸟的故事图片大全图片大全图片韩国女孩吃棒棒糖图片大全图片大全图片大全图片大全情侣花头像图片大全机器人已经全面代替了人类的一切,人类终于过上了衣来伸手饭来张口,不用劳作的神仙生活。 在机器人的全方位服侍下,满足了人类的各种欲望。所有人都失去了梦想,变成了只会贪图享乐的行尸走肉。 然而一艘神秘的战舰打乱了世界的局面,人类被封锁,世界被隔阂。 长久生活在温床的人类终于觉醒了生存的欲望,他们要冲上云霄,探索世界的真相 然而没有想到的是 他们不仅要面对机器人的阻拦,还要提防同类的算计。人似乎比机器人更加可怕!我长相清秀,但不企于帅气,表面的浪子也只是埋藏真诚的狼皮。一次次的失败什么时候才能成功(本文讲述一个男孩子的迷路感情成长)穿越大唐贞观年间,成为李世民第九子李治。 开局只有四岁,并且身负混世魔王系统。 十万里加急的信鸽算什么? 烤! 圣旨算什么? 画! 李二算什么? 整! 李二:“王德,最近雉奴学业如何?” 王德:“陛下,孔颖达已拜晋王为师!” 李二:“什么?” 王德:“阎立本、王献之紧随其后,也对晋王殿下以师见礼!” ………… 琴棋书画,刀枪剑戟,文武双全定江山。 我李治自认第二,谁敢称第一?欲择一方安宁,奈何世事无常,纷争不断,谁可主宰浮沉,换得一世太平 原本这个世界挺正常的,直到有一天,杜五仁看到了在天空翱翔的人类后,整个世界都不正常了。 老师:什么!你竟然会九阴白骨爪,看来我不能再隐藏了。 哥们:什么!你竟然有上古神器,看来兄弟我装不下去了。 父母:什么!你…你竟然考试没及格,看我不教训你。 杜五仁:……幸好我有系统大大。 幽体纵横末日时代,人类开始适应环境从而进化,这是可怕的时期,人类濒临灭绝 这是人类最后的时代。A城中流传着有关另一个世界的古老传说,人群沸腾之中真相却愈加扑朔迷离,令人可怖的巨型落日,落日之中是否隐藏着白骨与宫殿?科技局频频消失的人员,谁也解释不清的末日传闻,究竟是谁在传播这些故事?全城警戒,车祸不断,枪战迭出,这一切的背后是怎样的黑手操控?落日之战,三分天下,黑科技武器迭出不穷,谁操纵了这个世界的程序,谁就是这个世界的王。从轮椅上的青年走上至尊王位,手下听命的不仅是骁勇善战的千军万马,更是大自然的风雨雷电,在这不可想象的逆袭背后,竟是一个庞大的科研计划,几代人的前赴后继,延绵成这个世界两万里白骨的奇观,而挽救末世危机的秘密,竟就隐藏在这虚拟时空之中.....本是万千普通人中的一员,竟遇古装女子流落小巷,一向宅男的曹烨把女子领进了家里,却不知道女子另有秘密。这是一个以召唤师为主流的世界。 动物,植物,元素,死灵,机械……精灵,刀剑武器皆可被从异世界召唤出来,而召唤他们的人类被称为召唤师。 打王者时被闪电击中的云飞意外来到这个世界,本以为没有召唤师天赋的他注定平平无奇,却意外觉醒王者英雄召唤系统,可以召唤王者世界里的英雄。 于是他走上了一条极为不正经的召唤师之路。一个冷静正直的剑客。   一个自强不息的傻少爷。   和一个刁钻古怪的公主。   他们本不是一路人。   可是一件惊天劫案,让三个性情完全不同的人走到了一起,从此生死与共,祸福相依。   为了追查劫案,他们又无意中卷入了江湖四大家族的明争暗斗之中。   英雄翻身动乾坤,自此天下不太平。   江湖中,十大剑客纷纷现身,四大家族你争我夺;朝野上,萧王一心匡扶社稷,东厂却屡屡诸杀忠臣。   我师三人行,共赴江湖路。风云突变疾,剑中影重重。(注:此书原名《剑中影》,为修订版本,纯武侠风格。)。
生存之赏金猎人 死后皆是遗憾 重生:都市神器之主 黑鸦之吻 世末存生 大爱真仙 修元大陆之林玄 灌水之王,发呆专用 人道曙光 湘鄂西志异 幕后的观众 不死之身,等我 血月影 卷帘大将前传 做女帝秘书学斩神 灵力逼人 三国:满朝文武全是穿越者 宗虚公子 修仙恩仇秘录 曼陀罗旅人 动画睡觉亲吻图片大全图片搜索 灰色手机壁纸女生动漫图片大全图片大全 黑色漂亮图案大全图片大全图片大全图片搜索 穿的高跟鞋图片大全图片大全 地油灯图片大全 狐狸和小鸟的故事图片大全图片大全图片 黑色漂亮图案大全图片大全图片大全图片搜索 灰太狼帅气动漫图片大全 猴子图片大全集 绘画小白兔图片大全 黑钥匙图片大全图片大全图片大全 黑钥匙图片大全图片大全图片大全 花系女生头像手绘图片大全图片大全 灰色手机壁纸女生动漫图片大全图片大全 欧美男眼睛图片唯美图片大全大图 穿的高跟鞋图片大全图片大全 黑色衣服的二次元男生头像图片大全 动画睡觉亲吻图片大全图片搜索 情侣图片短发女生头像图片大全 欧美男眼睛图片唯美图片大全大图片大全 灰色手机壁纸女生动漫图片大全图片大全 欧美男眼睛图片唯美图片大全大图片大全 情侣图片短发女生头像图片大全 手机自拍头像怎么好看图片大全 微信外国头像图片大全 花系女生头像手绘图片大全图片大全 动画睡觉亲吻图片大全图片搜索 地油灯图片大全 情侣图片短发女生头像图片大全 猴子图片大全集 穿的高跟鞋图片大全图片大全 皇冠皮肤图片大全 宠物熊猫图片大全可爱图片大全图片下载 欧美男眼睛图片唯美图片大全大图 情人节情趣图片大全 初音未来水中高清图片大全 宠物熊猫图片大全可爱图片大全图片下载 黑色漂亮图案大全图片大全图片大全图片搜索 情人节情趣图片大全 橙子头像图片大全 初音未来水中高清图片大全 灰太狼帅气动漫图片大全 韩国女孩吃棒棒糖图片大全图片大全图片大全图片大全 黑色衣服的二次元男生头像图片大全 拳皇图片高清图片大全图片大全 皇冠皮肤图片大全 黑钥匙图片大全图片大全图片大全 初音未来水中高清图片大全 花系女生头像手绘图片大全图片大全 黑色个性手指图片大全图片大全图片大全 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 一个农村男孩的奇幻冒险 异世界神探 药司 乌龙院之招财进宝 仙魔屠戮场 葡京官网 欧博官网 亚星管理平台 葡京官网 皇冠登3出租 黑色个性手指图片大全图片大全图片大全 花系女生头像手绘图片大全图片大全 宠物熊猫图片大全可爱图片大全图片下载 动画睡觉亲吻图片大全图片搜索 灰色手机壁纸女生动漫图片大全图片大全 欧美男眼睛图片唯美图片大全大图 猴子图片大全集 黑色漂亮图案大全图片大全图片大全图片搜索 灰太狼帅气动漫图片大全 灰太狼帅气动漫图片大全 拳皇图片高清图片大全图片大全 皇冠皮肤图片大全 初音未来水中高清图片大全 黑色的猪动漫图片大全图片大全图片大全 情侣睡觉动漫图片大全可爱 欧美男眼睛图片唯美图片大全大图 手机自拍头像怎么好看图片大全 情人节情趣图片大全 橙子头像图片大全 动画睡觉亲吻图片大全图片搜索 皇冠皮肤图片大全 长发凌乱图片大全 黑色个性手指图片大全图片大全图片大全 黑色个性手指图片大全图片大全图片大全 橙子头像图片大全 橙子头像图片大全 韩国女孩吃棒棒糖图片大全图片大全图片大全图片大全 拳皇图片高清图片大全图片大全 初音未来水中高清图片大全 黑色的猪动漫图片大全图片大全图片大全