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
广东番禺顺丰快递电话广东申通快递客服电话广东番禺顺丰快递电话多少广东番禺顺丰快递电话多少时间广东番禺顺丰快递电话号码多少钱广东番禺顺丰快递电话广东广州的电话区号广东番禺顺丰快递电话多少广东申通客服电话人工服务广东电话打长途加什么光谷附近怎么寄顺丰快递电话广东番禺顺丰快递电话多少广东固定电话怎么打光谷附近怎么寄顺丰快递电话广东番禺顺丰快递电话多少钱一个月广东电话打长途加什么广东快捷速递有限公司电话官桥圆通快递电话广东番禺顺丰快递电话号码多少钱广东番禺申通快递电话查询广东申通客服电话是多少官桥圆通快递电话广东申通客服电话人工服务国际小包邮件单号查询电话广东番禺顺丰快递电话号码多少广东深圳快捷快递电话广东番禺顺丰快递电话号码多少国际小包邮件单号查询电话广东番禺申通快递电话查询广东广州的电话号码是多少 血与火的战场,风声鹤唳的山林,神奇的猛兽和古武少年,这是一支有着铮铮铁骨的特种部队,这是一群浴血疆场、有血有泪的特种军人。枪声与热血共存,猛兽与英雄相伴,这是一本描写铁骨军人的书! 书友群号:336093992 竹香书屋VIP读者群:群号468694031我叫林温,是一名末日生存爱好者,这些年来,一切我能想到的物资我都储备了。 或许别人家里摆着一墙壁的AJ或者手办,而我一整面墙壁,储存了数十斤压缩饼干,上百个罐头,医疗用品、防毒面具以及防化服,甚至还有自制手弩。 我常常幻想着末日降临丧尸围城,那堆满物资的储物间,就会是我最安心的庇护所。 而让我意外的是,当末日真的降临时,一切与我的幻想截然不同。没有血腥残暴的丧尸,没有异想天开的外星人入侵。 那日,璀璨的光团从苍穹降临,它宛如神祇,没有人可以直视。 ……江湖纷争,武林泰斗,为了夺得天下第一,各大门派明争暗斗。亲情,友情,爱情。 情到深处,要怎么说出口…… 尘世情缘,缘起缘灭,花开花谢。 随风而逝的青春,只为遇见你。 爱至深——才懂——爱至重 ……  我,许小侠,以吾辈之名,敕令诸神!   一个名为奇驴剑宗的宗门,因为老祖鸿卢得道飞升,成为了流云大陆万年来剑破诸天第三“人”。   其正选弟子都须按照宗门律法尊养着一头驴,证道修行。   时过境迁,宗门没落,沦为天下灵修笑柄。   这日,一个茅草屋内,许小侠看着用屁股对着他的小毛驴问道: “总有一天我们会站在流云大陆的顶峰,对吧?”   他没想到他的驴居然开口说话了…   “不!小子,总有一天你和老夫会凌驾于诸天万界之上!”死亡世界与现实生活中的联系,刘雪恒神秘的二哥,那些个曾经认识的人,那段不为人知的记忆,一切的背后,谁在推波助澜?  【爆爽快穿+全民穿越+诸天万界】   三个月前,全民穿越的时代开启;   然而三个月过去了,超高接近百分百的死亡率却让普通人对成为穿越者避之不及;   只想当个普通人的沐尘幸运地被选中成为00001号穿越者;   在他之前00001这个编号在短短三个月的时间已经死了六任穿越者 而沐尘接到的第一个任务是……暴揍荒天帝… 之前我在别的网站也写过这个,所以没什么雷同之说,而且基本上都是我写的为了男人的承诺,萧晨强势回归,化身美女总裁的贴身保镖,横扫八方之敌,谱写王者传奇!   他——   登巅峰,掌生死,醒掌天下权,醉卧美人膝! —————— 小舞的微信公众号:寂mo的舞者,可以去关注哦! 小舞的QQ:1589045849,可以去加好友! 唯舞独尊①群:545765633!   这是一个普普通通的穿越者 这是一方家国不存的废土世界 突如其来的无限轮回 生存,毁灭 追寻剑的真谛
灵气复苏:亿万增幅修炼 穿越后,我暴打仙侠大佬 谍战求存之我只想活过一集 末世游戏:我成了一只丧尸 魂灵异能:异变之战 重生之狐仙姐姐爱上我 云顶之弈月神传说 神墟之祖 狂龙御天 艾芙海姆 御兽异次元:位面之战 穿越之荒唐人生 白与昼,黑与夜 非狼 转生之都市霸主 短片集合 繁华的守护者 剑开仙途 乱世货郎 旁观过客 广东申通快递客服电话多少 广东申通快递客服电话多少钱 广东快捷速递有限公司电话 广东番禺顺丰快递电话号码多少钱 广东申通快递客服电话多少 郭杜顺丰快递电话多少 广东快捷速递有限公司电话 广东东莞电话区号多少 广东深圳快捷快递电话 广东固定电话怎么打 广东潮州公司快递电话号码 广东潮州公司快递电话号码 广东番禺申通快递电话 广东申通快递客服电话多少钱 广东番禺顺丰快递电话 广东番禺顺丰快递电话号码多少钱 广东快捷速递有限公司电话号码 广东申通快递客服电话多少 广东申通客服电话是多少钱 广东番禺顺丰快递电话多少 广东申通快递客服电话多少钱 广东番禺顺丰快递电话多少 广东申通客服电话是多少钱 官桥圆通快递电话 广东电话打长途加什么 广东番禺申通快递电话 广东申通快递客服电话多少 广东申通快递客服电话 广东申通客服电话是多少钱 广东深圳快捷快递电话 广东番禺顺丰快递电话号码多少钱 光谷附近怎么寄顺丰快递电话号码 广东番禺顺丰快递电话多少时间 广东番禺顺丰快递电话 国际小包邮件单号查询电话 广东番禺顺丰快递电话号码多少 广东番禺顺丰快递电话多少时间 广东快捷速递有限公司电话 国际小包邮件单号查询电话 广东番禺顺丰快递电话多少钱一个月 广东番禺顺丰快递电话号码多少 广东东莞电话区号多少 广东番禺申通快递电话号码 广东快捷速递有限公司电话号码 光谷附近怎么寄顺丰快递电话 光谷附近怎么寄顺丰快递电话号码 广东潮州公司快递电话号码 广东番禺顺丰快递电话号码多少 广东番禺申通快递电话 广东广州区号电话区号 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 穿越 战双:帕弥什 雪啸炎海 重生之我们来自地球 大乾败家子 弑烬武煞 澳门葡京游戏官网 葡京官网 AG真人 欧博官网 亚星游戏官网 广东申通客服电话是多少钱 官桥圆通快递电话 广东番禺申通快递电话查询 广东申通快递客服电话 广东广州的电话区号 光谷附近怎么寄顺丰快递电话号码 广东申通快递客服电话多少钱 广东番禺顺丰快递电话号码多少 官桥圆通快递电话 广东番禺顺丰快递电话多少钱一个月 广东固定电话怎么打 广东快捷速递有限公司电话号码 广东番禺申通快递电话查询 广东番禺顺丰快递电话号码多少 广东深圳快捷快递电话 广东番禺顺丰快递电话 广东申通客服电话是多少 官桥圆通快递电话 广东番禺申通快递电话 广东广州的电话号码是多少 广东广州的电话号码是多少 广东番禺顺丰快递电话 广东番禺顺丰快递电话 国际小包邮件单号查询电话 广东番禺顺丰快递电话号码多少钱 广东番禺顺丰快递电话多少 广东东莞电话区号多少 广东快捷速递有限公司电话号码 广东番禺申通快递电话 广东番禺顺丰快递电话多少时间