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
中国贷款比例多少合适中国银行卡怎么贷款利率中国贷款比例多少钱中国贷款是多少钱啊中国农业银行授信贷款中国贷款比例多少合适中国银行贷款查询需要哪些资料中国贷款比例多少钱中国银行的车贷款利率只靠身份证可以贷款吗只有夫妻可以共同贷款买房吗中国贷款比例多少钱中国人均贷款是多少钱只有夫妻可以共同贷款买房吗中国贷款比例是多少只靠身份证可以贷款吗中国银行贷款查询需要手续费吗只有工行流水能贷款吗只有工行流水能贷款吗中国出过无息贷款中国银行 爱家分期贷款只有工行流水能贷款吗中国银行的车贷款利率中国银行个人金融贷款利率是多少钱中国建行贷款咨询电话中国银行贷款查询需要中国建行贷款咨询电话中国银行个人金融贷款利率是多少钱中国出过无息贷款中国人均贷款是多少钱一场空难,韩涛和邻座的美女流落到了未知的荒岛。没有救援,危险重重,没有见过的野兽,人迹罕至的秘境,与世隔绝的蛮族,沉没在海底的遗失文明……惊险、刺激、还有绝境中人性的善与恶,一切不可抵挡的扑面而来。网游映射现实,大三学生江晓玩了十年的《神话》直到关服。 他把网游玩成了单机,制霸游戏各种榜单。 当别人还在打怪升级的时候,他已是满级存在,当别人拿着几十万战力炫耀的时候,他的战力早已超越一亿; 他是全服隐藏职业之首,精通所有职业技能,能随心所欲切换职业战斗形态。 且看江晓如何玩转灵气复苏的游戏世界。流星雨来,小行星至,地球面临灭顶之灾。 劳士力前往太空执行任务,返航途中救下乔伊娜。 火山灰笼罩地球,航天飞机不能降落。 几近绝望的劳士力和乔伊娜,以登录梦幻社区虚拟世界寻求心理上的宁静与安慰。 他们将承担起人类繁衍与发展的重任…… 一切都在AI控制中……公主要嫁我? 太后要我当面首? 东厂厂公也欣赏我? 你不会说皇帝要找我搞龙阳吧? 重申一下,我方泽喜欢女人异能者叶丛,任务过程中意外穿越到修仙者大陆,开启一段异能修仙之路来自星辰的启示, 人与神明相抗争。 超前进化的智慧, 痴迷幻梦不愿醒。 败军之将,梦途惊醒,逆天改命,铸就新(醒)程。 一个生活在地球上的少年意外的穿越来到了怪物大师的世界里,身为穿越者的他,本该以主角的身份纵横剧情,但谁知却失去了穿越前的所有记忆,最终在医疗怪物大师亚克的帮助下,走向了成为一名怪物大师的道路。 少年一步一步的成长,同伙伴经历众多,同时也寻找着失去的记忆,但他发现,这个世界似乎与其他的世界相连通? 银发紫眸,与他来自同一世界的精灵; 狐耳狐尾,来自云国古都的少女; 继承了深渊神秘力量的刺客;追随光明的少年剑士; 还有背负长枪,身世神秘的少年;背离家族,寻求自由的继承人;挣脱牢笼,飞向辽阔天地的琴女。 ———— 1:本书融合了包括奥拉星,怪物大师,剑灵等作品在内的各种世界观以及大量的自创设定,不喜勿喷。(详细见《阅读指南》) 2:本书同其他几部作品联动,包括《怪物大师伊洛维奇自传》《剑灵风成趣传》《怪物大师新生》等,部分联动作品连载于其他网站上。 交流群:1034283852 作者QQ:3167802402   穿越成为镇南王府的世子,本来想安安心心当一个纨绔,上街打算强抢民女,却没想到一个不小心竟然抢走了微服出宫的当朝公主!更没想到的是,皇帝不但没有怪罪,反而将公主赐婚给他!不是吧,我真的不想当驸马爷!少年天才于洋来到黄海市当保镖,且看他如何走上人生巅峰四海升平,华灯初上,宁静祥和的外衣下,隐藏着无数不为人知的故事。在满天都是飞机,满街都是电脑的高科技时代,依然有太多科学无法解释的事,风水、命理、道术、阵法、阴阳五行、奇门遁甲、有人仗着身怀绝技贪婪为恶,当然也有人守正辟邪,自古正邪不两立,不止有警察是犯罪的天敌,道士、高僧、出马弟子、阴阳先生也与那些丧尽天良的邪师术士势不两立,正邪交锋一触即发。
人化灵传 书隐仙踪 相亲:女鬼都说我是渣男 大明权相 怪异:我真不是神经病啊 男人不在家的日子 藏剑:通天修为 别闹,我真的不怕揍 触及的大道本源 我的宠物是大佬 国医:开局扮演神级手术大师 一条道 御灵逆天之旅 迷雾终末 GL赛事录 大国无双 幽冥古神 重生魔祖之蚊道纵横 重生之实业帝国 大秦:开局欠始皇百万黄金 中国银行卡怎么贷款 只有夫妻可以共同贷款买房吗 中国信用贷款网 中国贷款是多少钱啊 中国银行卡怎么贷款 中国银行个人金融贷款利率是多少 中国银行贷款查询需要手续费吗 职工信用贷款利率 中国银行贷款查询需要 中国平安抵押贷款电话 中国银行贷款帐户查询 中国银行贷款帐户查询 中国e贷款怎么办理条件 只有夫妻可以共同贷款 中国贷款比例多少合适 中国农业银行授信贷款 中国银行贷款担保人审查 中国银行贷款查询需要 中国银行卡怎么贷款 中国贷款比例多少钱 只有夫妻可以共同贷款 中国贷款比例是多少 中国银行卡怎么贷款 只有夫妻可以共同贷款买房吗 只靠身份证可以贷款吗 中国e贷款怎么办理条件 中国银行贷款查询需要 中国银行卡怎么贷款利率 中国银行卡怎么贷款 中国银行贷款查询需要 中国农业银行授信贷款 只有夫妻可以共同贷款吗 中国贷款是多少钱啊 中国贷款比例多少合适 中国银行个人金融贷款利率是多少钱 中国建行贷款咨询电话 中国贷款是多少钱啊 中国银行贷款查询需要手续费吗 中国e贷款怎么办理条件 中国贷款比例是多少 中国建行贷款咨询电话 中国平安抵押贷款电话 中国贷款比例多少 中国银行贷款担保人审查 只有夫妻可以共同贷款买房吗 只有夫妻可以共同贷款吗 中国银行贷款帐户查询 中国建行贷款咨询电话 中国e贷款怎么办理条件 中国银行贷款查询需要哪些资料 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 诡倒影 程明远传奇 不靠系统的我就是five 末世为谁而鸣 玄幻:华夏玄学院继承人 百家乐官网 澳门葡京游戏官网 葡京官网 百家乐官网 万利游戏官网 中国银行贷款查询需要哪些资料 中国银行贷款帐户查询 中国银行贷款担保人审查 只有夫妻可以共同贷款 中国出过无息贷款 中国贷款比例多少钱 只靠身份证可以贷款吗 职工信用贷款利率 只靠身份证可以贷款吗 中国银行卡怎么贷款吗 职工信用贷款利率 中国信用贷款网 中国银行卡怎么贷款利率 只有夫妻可以共同贷款买房吗 中国建行贷款咨询电话 中国银行贷款担保人审查 中国银行个人金融贷款利率是多少钱 中国出过无息贷款 中国e贷款怎么办理条件 中国银行的车贷款利率 只有夫妻可以共同贷款吗 中国平安抵押贷款电话 中国出过无息贷款 中国银行卡怎么贷款利率 中国银行 爱家分期贷款 中国贷款是多少钱啊 中国银行卡怎么贷款 中国银行贷款查询需要 中国贷款比例是多少 中国银行个人金融贷款利率是多少