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
a3激光彩色打印机价格建设150-3c离合片价格三级建筑公司转让价格a3a4打印价格蜜思可可代理价格表a3激光彩色打印机价格野生灵芝价格行情三级建筑公司转让价格浙江野生惠兰价格是多少江门铝合金门窗材料价格coccinelle b14专柜价格a3激光彩色打印机价格血蜡价格黑梯铝价格三级建筑公司转让价格江门铝合金门窗材料价格灵芝根价格A3扫描价格A3扫描价格泉州光纤熔接价格dyson香港价格A3扫描价格浙江野生惠兰价格是多少优博讯i6200s价格蜜思可可代理价格表雷朋前档膜lb-855价格a3a4打印价格虎班兰花的价格北京夜店价格表血蜡价格重生成顾家世子,顾天宸为家族征战八方,血染沙场,却 不想回归之日,至亲妹妹被扒皮抽筋,生不如死。 顾天宸暴怒而起,妹妹所受之痛,必将百倍奉还! 恰逢仙武印记开启,打开肉身枷锁。 北冥吞天诀,吞天地万物,融万族血脉! 大日金钟罩,汲取太阳精华,铸九阳金身! 魔极龙象功,魔龙神象之力加身,碎日月苍穹! 这是一个混乱的纪元,苏元剑指九天十地,登临诸天 尽头,摘星辰,踏神魔! 冒险可以使人成长该不该玩游戏?网络游戏,手机游戏,各种单机游戏。游戏的世界你不懂,我也不懂! 爱玩游戏的欢迎进入。天下之人皆可修仙,万神榜上众神为世间修士仰慕之人,其中以四大武神为尊。 修仙世界以实力至上,即使阴邪之人,亦能登顶武神之列。那当世最强武神,欲将世间灵气控制,使世人重回凡人之列,减少修仙之人。 压迫至极必有反抗,朴实僧人以血渡苍生,中年儒生为天下之人谋前程。一时间群雄并起,反抗之战愈演愈烈… “白景,你可知我一直喜欢你”,这一日,那位风流女子剑修,最终亲自斩断情丝,成就天下第一剑神。 且看修仙废物白景,如何带着系统修炼日夜苦修,问鼎天下,成为最强武神,重新订制世界规则!来此一朝,无怨无悔,天神、梦魇、苍生,我为天下生而生。 浮屠阁内糊涂生,了却浮生梦半真。 世间最真挚的情是——手下留情。 蜻国与蝉国、蛐国发生战争,弄丢一国之宝即历代女仙眼原,新一代女仙蜻缘心到人界寻眼原,与修仙院中青鸟弟子画中潇结识并相爱。得知他们是同命,性命相互影响。画中潇帮助蜻缘心寻得眼原,但是被蜻国巫师施法陷害,故而缘心嗜杀成性,被世人封杀,至此,画中潇和蜻缘心的缘分被月老在情缘簿上划去,因而他们情缘终结……格洛斯特国在2100年创造出了第一批抗侵略的机甲武器,效果十分显著,不仅抵挡住了其他国家的侵略还收复了之前战败的边境地区,在这之后,其他国家也纷纷效仿格洛斯特国舍弃了对普通的枪械和炮弹的研究,也转向研究并创造出了机甲武器,世界爆发了机甲时代战争,战争依旧没有停息,格洛斯特国在2108年秘密打造出了约5m的由人类为载体的新型可作战机甲,但由于驾驶员的大脑活跃度和反应速度的年龄有着过高的要求,军方要求由25岁以下16岁以上的全部非贵族国民必须要参军,因此有大部分的高中生和大学生也必须参军,本是该好好享受青春的年纪却要被迫于战争和死亡为伍,本应握着笔的手却握着机甲操纵杆,战争是残酷且不公的,一群背负保卫国家使命的少年们啊,为了自己想守护的东西而苟延残喘的活下去吧!无敌天骄, 神魔血脉, 吾持一剑,碾天骄,镇神魔, 一剑碎山河,破九天,通万古……“沈昱辱我清白之身,还请沈家给我李家一个公道!” “身为沈家世子,犯下此等恶劣罪行,汝可知错?” “欲加之罪何患无辞!” “证据确凿,汝犯下此等滔天罪孽,还不认错,罪加一等!” “罚你禁足三年,将汝之罪行,昭告天下!” 一个流落世间的孤儿,一块能梦中进入的玉佩。 十八年后,老头子给了他一只木簪,说这是给他找的媳妇,于是夏宇走出了大山。 只是到了北海市后,他并没有找到自己的媳妇,而是转身成为了一个傲娇大小姐的保镖。 于是,北海大学最牛逼的校花保镖轰然出世! 只是夏宇不知道是,木簪的主人,在第一天,他便已经见到了……
觅路行 开局超强神技:化敌为友 江湖有你才有传奇 圣穹寂 枪挑万古之无脖传 落地成盒:泉水指挥官 仙罹 七元剑神 层叠世界 梦断仙踪 谷仙诀 白雪下的蓝天 三族至尊 剑锋之上人界篇 我是半个盖亚生命 国运:妖魔算个屁! 九天道途 承包商:D区往事 苟延残喘罢了 道门天才 黑梯铝价格 电路板pcb测试仪价格优惠 常州婚纱摄影价格 福喜原装大灯的价格 黑梯铝价格 灯笼零售价格 a3激光彩色打印机价格 商丘市水泥价格 coccinelle b14专柜价格 优博讯i6200s价格 沧田ts620k2价格 沧田ts620k2价格 马氏冷压机价格 雷朋前档膜lb-855价格 灵芝价格厂家供应 浙江野生惠兰价格是多少 a3激光彩色打印机价格 coccinelle b14专柜价格 蜜思可可代理价格表 野生灵芝价格行情 电路板pcb测试仪价格优惠 灵芝根价格 A3扫描价格 dyson香港价格 商丘市水泥价格 马氏冷压机价格 coccinelle b14专柜价格 A3扫描价格 dyson香港价格 雷朋前档膜lb-855价格 蜜思可可代理价格表 灯笼零售价格 a3a4打印价格 a3激光彩色打印机价格 虎班兰花的价格 蜜思可可代理价格表 沧田ts620k2价格 野生灵芝大全图的价格 优博讯i6200s价格 沧田ts620k2价格 蜜思可可代理价格表 蜡烛草价格多少 泉州光纤熔接价格 耗材耗材维修费用价格表 黑梯铝价格 灯笼零售价格 浙江野生惠兰价格是多少 a3a4打印价格 北京夜店价格表 野生灵芝价格行情 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 最后一个剑修 汕海秋风 破碎重装 愉悦篇 诸天圣主 天门计划 百家乐官网 澳门葡京官网 葡京官网 百家乐官网 万利游戏官网 浙江野生惠兰价格是多少 雷朋前档膜lb-855价格 蜜思可可代理价格表 虎班兰花的价格 灵芝根价格 建设150-3c离合片价格 血蜡价格 北京夜店价格表 浙江野生惠兰价格是多少 蜜思可可代理价格表 蜜思可可代理价格表 常州婚纱摄影价格 a3激光彩色打印机价格 虎班兰花的价格 北京夜店价格表 雷朋前档膜lb-855价格 a3a4打印价格 灯笼零售价格 福喜原装大灯的价格 虎班兰花的价格 黑梯铝价格 建设150-3c离合片价格 蜡烛草价格多少 优博讯i6200s价格 浙江野生惠兰价格是多少 蜜思可可代理价格表 a3a4打印价格 dyson香港价格 建设150-3c离合片价格 野生灵芝大全图的价格