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
艾莎抽脂手术关灯小游戏 大乐趣安全食品小游戏爱玩儿游戏吗阿sue公主游戏大全下载爱游戏经典玛丽艾莎安娜拉肚子小游戏艾莎美人鱼化妆小游戏爱玩儿游戏吗爱照相的小狗游戏下载爱莎的游戏。爱沙手术游戏艾莎抽脂手术关灯小游戏 大乐趣艾莎急救游戏爱喝啤酒的游戏爱玩儿游戏吗爱莎的游戏。艾莎美人鱼化妆小游戏大全爱喝橙汁游戏爱喝橙汁游戏爱开车的游戏爱耍游戏的女人爱喝橙汁游戏爱照相的小狗游戏下载艾莎胃部手术小游戏爱游戏经典玛丽爱心小蛋糕小游戏阿sue公主游戏大全下载艾莎胃部手术小游戏爱开车的游戏艾莎急救游戏一座图书馆,一本普通的书,一个平凡的大学生,在那一天之后,命运产生了翻天覆地的变化主要是青天日月曜神为首的曜神与雷祖天尊普化大弟子张叔夜结下仇缘,后三十六天罡 七十二地煞帮助青天日月曜神一齐将雷祖与雷将一一打退,后齐天大圣大闹天宫,三十六天罡七十二地煞为报齐天大圣旧情,不发兵救援(玉皇大帝),被玉皇大帝关押在龙虎山,后洪太尉奉孙悟空之命放走三十六天罡 七十二地煞,雷部三十六将和雷部大弟子及其左右待者并约一十八散仙私自下凡除去三十六天罡 七十二地煞,后八位散仙一一阵亡,只剩那十名散仙,那八位散仙并告知青天日月曜神七十二地煞三十六天罡被斩,青天日月曜神等一齐大怒并上报玉皇大帝下凡除雷部三十六将,玉皇大帝也大怒道:请勿伤害雷祖三人,只拿回归案,朕自会解决。青天日月曜神等并道:好,遵陛下命令。青天日月曜神等转世为人,青天日月曜神只需了宣和十年将三十六雷将 八位散仙一一诛灭。本来以为只是一个非常简单的送信任务的秦朗,怎么也没想到师傅是让他和神武将军慕容博之女慕容婉儿完婚的,结果人家根本看不上他这乡巴佬的样子拒绝这门亲事,本来没这打算的秦朗也没纠缠,以进入大武帝学院和慕容婉儿达成交易,让秦朗没想到的是大武帝国第一美人,帝国最受宠的公主尽然要嫁给自己,而这也给秦朗带来了一系列的麻烦,看秦朗怎么在这个群英荟萃的大武帝学院搅动风云友谊 从英国SAS退役的加姆·凯尔来到位于美国德克萨斯州的祖父家暂住,祖父曾是一名二战士兵。在晚上洗澡时他突然听到枪声,由此拉开了一个神秘组织与祖父千丝万缕的关系,也迎来了他的新的征途。前半生默默无闻,受尽屈辱。 跳崖后意外获得一座金山。什么? 你让我老老实实当个普通人? 好,我答应你。什么豪车豪宅,长腿御姐,这不都是普通人的标配吗? 天命昭昭,余生瑶瑶 写网文好痛苦啊!一直写不出来啊! 要不来写日记吧? 正经人谁写日记啊?你写么? 我写~ 。。。。。。 当年,因为一场联姻的阴谋,钟烁的妻子宋月琳联合宋家,让原本鼎立于花城的豪门,钟家,在一夜之间惨遭灭族!身为钟家纨绔少爷的他,临死前看到一把火烧了钟家大院的妻子满脸冷笑,用一柄匕首刺入自己的心脏,他亲眼看着自己的妻子就这样杀死了自己! 魂穿异世的他,在万年后,成为了睥睨混沌仙界的仙帝! 但再次因为一场背叛,仙帝重生归来,他的怒火,将会烧光整个宋家!一段坎坷的爱情故事。感激孙淑娟老师与水木布衣一路的支持和鼓励滴滴滴…………吐槽系统已连接初号玩家! 没错,我叫郑飞,不是真废,但同样也是真的废! 什么玩意?吐槽系统!?吐槽就可以得到超级能量! 什么,在吐槽系统中!吐槽还分三六九等的级别!吐师!大吐师!吐宗!吐王!吐帝!吐皇!吐尊!吐圣!吐神! 系统连接!嘴遁开始!成为主角!吐槽升级!异界百世!由我畅游! 什么?你说吐槽不能升级?我说吐槽偏偏就能升级! 逗逼三国,二货西游!傻缺封神,皆等去探索吐槽! 穿越百世!属我最狂!要问为何!吐槽最强? 快看郑飞怎样无敌嘴遁?穿越异世,吐槽成神! 一开始便 莫名其妙的穿越到了西游主角被压在五指山下的时间段??这么倒霉?刚开始就卡关了!要活活煎熬的忍耐500年吗?或者是启用超级战斗系统直接崩开五指山?再次大闹天宫?产生不一样的结果,系统的bug!和达到巅峰系统系数产生一次失败战斗的重启!会产生怎样的精彩的故事? 经历四大名著主角不一样的爱恨故事经历、 且看且品小说人生…………
九曲归一刀 我要做小区主人 帝国第一纨绔 雾何破案记 综漫之氪金系统 寒门天子 追求不可改变的未来 我在诡异世界开宝箱 大明求生记 k小队 落叶随风至天台 鉴鬼策展人 一品典签官 神剑之冷弦清雨朝慕雪 惊悚游戏:就你是BOSS? 葬剑祈 变身奇遇11 极光会的自我修养 黑帮BOSS在韩国 什么都能修的匠人 安装房间的游戏大全 爱莎的游戏. 艾莎美人鱼化妆小游戏大全 爱喝橙汁游戏 安装房间的游戏大全 艾莎死了小游戏大全 艾莎女王怀孕游戏 艾莎怀孕抢救的游戏 爱心小蛋糕小游戏 艾莎急救游戏 爱照相的小狗游戏下载 艾莎女王怀孕游戏下载 阿姆的游戏二 爱莎的游戏。 艾莎安娜拉肚子小游戏 爱游戏经典玛丽 艾莎女王怀孕游戏 爱心小蛋糕小游戏 爱耍游戏的女人 艾莎抽脂手术关灯小游戏 大乐趣 爱莎的游戏. 爱玩儿游戏吗 安全食品小游戏 爱喝啤酒的游戏 爱莎的游戏。 阿姆的游戏二 爱心小蛋糕小游戏 安全食品小游戏 爱耍游戏的女人 爱心小蛋糕小游戏 爱游戏经典玛丽 爱莎的游戏. 爱玩儿游戏下载游戏 艾莎抽脂手术关灯小游戏 大乐趣 艾莎胃部手术小游戏 爱游戏经典玛丽 爱玩儿游戏下载游戏 艾莎美人鱼化妆小游戏大全 阿姆的游戏二 爱玩儿游戏吗 阿sue公主游戏大全下载 艾莎怀孕要生游戏 哎哟采油小游戏 艾莎女王怀孕游戏下载 爱喝啤酒的游戏 爱莎的游戏. 艾莎女王怀孕游戏下载 阿sue公主游戏大全下载 爱开车的游戏 艾莎美人鱼化妆小游戏 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 梵修罗Ⅱ轮回六道 战神联盟穿越了之哥哥 全球末世:我能无限升级 娱乐:我在前女友婚礼现场,宣布复出 天刀之人在江湖 欧博官网 百家乐官网 亚星管理平台 欧博官网 亚星游戏官网 阿sue公主游戏大全下载 艾莎美人鱼化妆小游戏 安全食品小游戏 艾莎怀孕要生游戏 爱耍游戏的女人 艾莎怀孕要生游戏 爱喝橙汁游戏 爱开车的游戏 安装房间的游戏大全 安装房间的游戏大全 爱照相的小狗游戏下载 安娜肚子疼小游戏 艾莎美人鱼化妆小游戏大全 阿姆的游戏二 爱玩儿游戏吗 艾莎怀孕要生游戏 艾莎女王怀孕游戏下载 爱沙手术游戏 艾莎拉肚子小游戏 爱游戏经典玛丽 安娜肚子疼小游戏 艾莎怀孕抢救的游戏 阿姆的游戏二 阿姆的游戏二 艾莎拉肚子小游戏 艾莎美人鱼化妆小游戏 爱莎的游戏。 爱照相的小狗游戏下载 艾莎美人鱼化妆小游戏大全 艾莎胃部手术小游戏