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
邮政国际客服电话舟山市东山社区电话邮政宁波服务站民安路电话右玉县杨千河乡电话渝北顺丰快递电话查询邮政国际客服电话榆林申通快递人员电话邮政宁波服务站民安路电话重庆渝中区快递电话邮政的快递客服电话叶集镇镇府热线电话邮政宁波服务站民安路电话榆林到各县物流电话叶集镇镇府热线电话右安门外翠林二里社区居委会电话邮政的快递客服电话榆林市榆阳区圆通快递电话邮政长春大街投递部电话在哪个区渝北顺丰快递电话查询邮政挂号电话重庆云阳能达快递电话邮政长春大街投递部电话在哪个区重庆渝中区快递电话舟山顺丰快递电话号码多少渝北两路快递电话舟山市普陀区百世汇通电话渝北两路快递电话舟山顺丰快递电话号码多少邮政挂号电话榆林到各县物流电话虽然我最厉害,但请一定要看不起我!   普通学生尹安,获得我最厉害系统,从此开启开挂人生,走上人生巅峰。尽管当今之世,英雄是跌出不穷,而后才发现,他算不得真英雄。重回九十年代,再小的人物,也将不会平凡,这本就是个小人物的大时代!您有没有遇到过,到某个陌生的地方,却有种曾经来过的熟悉感,感觉像梦里梦见过一般? 或是某条街道,或是某栋建筑,或是街边的某个橱窗。那种笃定曾经见过的信念,会吓自己一大跳! 但又实在记不起来,什么时候来过?或是通过什么方式真的见过?这又使得自己很迷茫。 御兽世界,御兽为尊。 星空万族,人族为尊。 赤贯妖星,异变降临。 人族崛起,踏破诸天。 穿越御兽世界,所有人都会在觉醒日的这一天,觉醒体内蕴含的御兽天赋。 只有觉醒御兽天赋,才能构建御兽空间,与御兽缔结契约,成为一名御兽师。 一名高级御兽师,在御兽世界里,享有极高地位,坐拥无尽的财富。 十年蛰伏,林轩终于在最后一次的觉醒日,觉醒了神圣级(sss级)天赋。 “哈哈,我觉醒了C级天赋,我的食铁兽刀枪不入,看它的技能,强化状态,天下无敌!” “我觉醒了B级天赋,我的黑斯蛙魅惑无比,致命梦幻!让你欲罢不能。” 看着周围同学的炫耀,林轩则不以为然。 就在刚刚,他觉醒了sss级天赋,他的技能,是无限加点。 只要他有足够的强化点,一只虫,也能直接破茧成蝶,直接进化为最终形态的天命神蝶。 当林轩召唤出自己的宠兽时。 数百米高的剑齿虎,一脚踏碎山崖…… 一只五彩斑斓的天命神蝶,一扇翅膀,整片虚空化为乌有…… 疯了吧,你的御兽能无限进化!一觉醒来,平平无奇高中生池铭来到以御兽为主流的平行世界。在这里,猛兽、仙灵、巨龙、精灵、死灵......各种千奇百怪的生物掌握超凡之力曾经一度统治整个世界,而他,将成为唯一能够彻底征服(暴打)它们的御兽师!全世界乃至全宇宙最强的男人! 当千年前入侵蓝星的天外势力再度复苏,数以万计的图腾级生物掀起灭世之战,而挡在它们身前的竟然只有一个人! 池铭抬起头,睥睨百里之外的狂兽之潮,淡淡道:“抱歉了各位,此路禁止通行,要说为什么,因为我强!” 抬手之间,巨大的契约召唤阵中浮现出一道道宛若神魔般的恐怖身影。“小蓝,干他!” 宠兽等级:觉醒,超凡,统领,君王,霸主,图腾,神话一个被遗弃少年的奇幻冒险伤害人的不止有夫妻之间的暴力,还有亲子之间的暴力。无论何时,请不要忘记,受害者的痛不应该被掩埋。应该有人替他们诉说这一切! 王卿穿越到远古时代,成为饕餮,才统治了这个世界,就被憨憨校花给召唤了,成了她的契约兽!   最离谱的是,连说话的权利都没有了。   “喵?”   “喵你个头啊!”   ......   我叫苏天天,被称为青阳学院的甜美校花!   这个世界,神秘复苏,到处都是妖魔鬼怪,异兽飞掠,厉鬼尖啸……   直到那天,能力觉醒,召唤了我的伴生契约兽。   然而我听到的第一句话就是:“喵?”   一只长得跟小黑狗一样的东西,开口居然是喵喵叫!   夭寿啦~~ 如果除去天生阴阳眼的话,我的前半生应该是普通的不能再普通了,但自从那天之后,我墨色的生活被染上了色彩。苦修十余年,却被告知自己有个富家千金的未婚妻?杨祁下山,却没想反遭对方长辈轮番羞辱!   男儿志气尚在,杨祁果断打脸对方,并且提出退婚!   然而,退婚一事不成,杨祁却卷入了江渝的风波之中,在风波之内以逆天医术,超凡武学打拼出一片天地!
浮世轻语 少爷,别怕! 太古第一仙 蛊的学习与研究 让你表演惊悚片,怎么全成真的了? 时间空气是什么,我不在意 浮沉河海 鬼王从向往到成仙之路 剑荡魔殇 红尘有缘 军团长的故事 大道执宰 都市异能:异人之上! 毅游沧海 都市:我有一个时空邮箱 战争时代I帝国辉煌 我要花五年拯救宇宙! 废土从超级基地开始 白与昼,黑与夜 九龙风水师 舟山市解放街道 电话 邮政大包电话 榆林市榆阳区圆通快递电话 渝北顺丰快递电话查询 舟山市解放街道 电话 舟山顺丰电话 榆林市榆阳区圆通快递电话 邮政服务电话收费 舟山市普陀区百世汇通电话 余杭顺丰配送员电话 重庆渝北市看守所电话 重庆渝北市看守所电话 周村供电电话营业厅 邮政大包电话 邮政国际客服电话 渝北顺丰快递电话查询 重庆渝北区龙溪邮政包裹电话 舟山市普陀区百世汇通电话 舟山市定海区邮政电话 邮政宁波服务站民安路电话 邮政大包电话 邮政宁波服务站民安路电话 舟山市定海区邮政电话 邮政长春大街投递部电话在哪个区 邮政的快递客服电话 周村供电电话营业厅 舟山市解放街道 电话 舟山市东山社区电话 舟山市定海区邮政电话 舟山市普陀区百世汇通电话 渝北顺丰快递电话查询 瑶海区快递电话 右玉县杨千河乡电话 邮政国际客服电话 舟山顺丰快递电话号码多少 渝北两路快递电话 右玉县杨千河乡电话 榆林市榆阳区圆通快递电话 周村供电电话营业厅 右安门外翠林二里社区居委会电话 渝北两路快递电话 邮政服务电话收费 邮政官方电话的作用 重庆渝北区龙溪邮政包裹电话 叶集镇镇府热线电话 瑶海区快递电话 重庆渝北市看守所电话 渝北两路快递电话 周村供电电话营业厅 榆林市榆阳区顺丰电话 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 半州风云 新尊 一个程序员穿越回大宋 执剑道天 我在修仙世界当领主 AG真人 欧博官网 亚星游戏官网 AG真人 百家乐官网 邮政宁波服务站民安路电话 重庆渝北区龙溪邮政包裹电话 重庆渝北区龙溪邮政包裹电话 余杭顺丰配送员电话 余杭顺丰配送员电话 瑶海区快递电话 邮政大包电话 渝北顺丰快递电话查询 榆林市榆阳区圆通快递电话 舟山市定海区邮政电话 邮政宁波服务站民安路电话 叶集镇镇府热线电话 周村供电电话营业厅 右玉县杨千河乡电话 舟山市普陀区百世汇通电话 邮政大包电话 邮政国际客服电话 榆林市榆阳区圆通快递电话 榆林市榆阳区圆通快递电话 右玉县杨千河乡电话 右玉县杨千河乡电话 邮政官方电话的作用 瑶海区快递电话 渝北顺丰快递电话查询 榆林市榆阳区顺丰电话 余杭顺丰配送员电话 邮政宁波服务站民安路电话 邮政长春大街投递部电话在哪个区 重庆渝北市看守所电话 右玉县杨千河乡电话