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
邪恶少女漫画行转换邪恶少女漫画无翼鸟知可子伯母邪恶少女漫画训幼师(2p邪恶少女漫画妖气色列漫画邪恶少女漫画妖气色列漫画下载邪恶少女漫画邪恶帝漫画大全少女漫画大全集邪恶少女漫画无翼鸟工口漫画大全邪恶少女漫画训幼师(2p邪恶少女漫画无翼鸟之熟睡邪恶少女漫画隐形机邪恶少女漫画隐邪恶少女漫画行转换邪恶少女漫画污污污.邪恶少女漫画淫三国邪恶少女漫画训幼师(2p邪恶少女漫画隐形机邪恶少女漫画无翼鸟和姐姐邪恶少女漫画遥控震动邪恶少女漫画遥控震动邪恶少女漫画邪恶帝漫画大全少女漫画大全邪恶少女漫画无翼鸟知可子邪恶少女漫画遥控震动邪恶少女漫画无翼鸟之熟睡邪恶少女漫画邪恶帝漫画大全邪恶少女漫画妖气色列漫画下载邪恶少女漫画仙人掌邪恶少女漫画妖气色列漫画邪恶少女漫画校园啪邪恶少女漫画邪恶帝漫画大全少女漫画邪恶少女漫画污污污.侦探 (全称:侦缉探查,英语:Detective) 是负责调查案件的职业。指负责调查的调查员(investigator),意思可以是私家侦探。艾特侦探所里的真正的侦探只有一个,外加三个合伙人......!茫茫天地,亘古永存,所有生灵,不断轮回,无限延续。 忽有一日,天地变,三界崩,阴阳转,轮回断,从此世间再无轮回,直至天地毁灭.....天也败,地也衰。规则乱化,被四大宗门所掌控,为所欲为。李毅,一个小人物,后发先至,厚聚博发,誓与天斗。苍天泣血,诸神恐惧。完成了他的传奇一生。 异元新生(又名双生) 这是一个平行世界。 我不是我,一样的人,不一样的世界,不一样的行迹轨道。   异世界,原世界之间存在着一可以修炼的不同之处。      寒星雨18岁生辰,意外身陨家中,醒来后,并不知道自己来到了平行世界中,同一时间线,自己小时候的身上。   这是一个异世界,与原世界只有部分的人事物相同,但是却是多了一个名为时灵师的修炼者。   这个次元的人大多都可以修炼,唯独他是一个个例,天生废体,无法修行,但他却是觉得修炼是枯燥的。   直到有一天,才知晓自己的身上发生的事情,原来他可以通过修炼回归原来的世界,否则命不久矣。   知道自己天众之资,才悔之晚矣……他在深海铜棺中沉睡了万年,此刻他醒来了,他手执弑天刀,对着污浊的苍穹呐喊:“若天道不公,我便踏碎这虚空!”我们每个人身体里,都有一种可怕,狂野和罔顾法纪的欲望,连那些看似温和的人也不例外。羊城火车站下来了一个刚刚从部队回来的士兵,一个拥有无尽战力却前途黑暗的强者,拥有上古血脉的王者其实没什么简介,冲就完事,奥力给干了兄弟们!农村出身,长于城市的00后少年,不幸被卷入一场跨越时空的阴谋,几次濒死,又几次死里逃生。终于邂逅了一位身具灵体天赋的小姐姐,时来运转,纵横星空,切除世界之癌解家国于倒悬,弹指间风暴清宁,名传处天地变色,挪星域如行棋,驱诸神如走狗,睥睨星海,引爆诸天…… "三阴绝脉"者,史书所载;凡患此症者非但终生不能修武,并且几乎无一人能侥幸活过十三岁。命运关上所有的幸运之门,却开了一扇窗,令其在绝境中峰回路转,当其踏着尸山血海攀上巅峰之时,骇然发现一个惊天之秘。暮然回首,惊觉自己脚下的这片世界幌若恒河之沙粒,渺若微尘。何去何从……
阴阳小面馆 金灵神剑诀 神医龙婿 异梦怪谈 无限循环:开局成为娱乐圈公敌 逆转穹天 星月仙帝 烽火重归 月影侠踪 末世:坏孩子军团 尘封游 蓑衣 宁古塔典狱长 血染的风采燕然勒功 飞水龙吟 惊鸿轮回 一剑庙堂江湖远 最后人类 那年花开落满山 护仙 邪恶少女漫画仙 邪恶少女漫画隐身人的邪恶欲望 邪恶少女漫画无翼鸟和姐姐 邪恶少女漫画遥控震动 邪恶少女漫画仙 邪恶少女漫画小圆酱24 邪恶少女漫画无翼鸟家 邪恶少女漫画樱fate 邪恶少女漫画仙人掌 邪恶少女漫画污污污. 邪恶少女漫画无翼鸟之熟睡 邪恶少女漫画无翼鸟医生 邪恶少女漫画邪恶帝漫画大全 邪恶少女漫画隐形机 邪恶少女漫画邪恶帝漫画大全少女漫画大全集 邪恶少女漫画妖气色列漫画下载 邪恶少女漫画无翼鸟家 邪恶少女漫画仙人掌 邪恶少女漫画无翼鸟知可子 邪恶少女漫画行转换 邪恶少女漫画隐身人的邪恶欲望 邪恶少女漫画训幼师(2p 邪恶少女漫画无翼鸟知可子伯母 邪恶少女漫画淫三国 邪恶少女漫画隐形机 邪恶少女漫画邪恶帝漫画大全 邪恶少女漫画仙人掌 邪恶少女漫画无翼鸟知可子伯母 邪恶少女漫画无翼鸟知可子 邪恶少女漫画仙人掌 邪恶少女漫画妖气色列漫画下载 邪恶少女漫画隐身人的邪恶欲望 邪恶少女漫画眼镜催眠 邪恶少女漫画行转换 邪恶少女漫画校园啪 邪恶少女漫画妖气色列漫画下载 邪恶少女漫画眼镜催眠 邪恶少女漫画无翼鸟家 邪恶少女漫画邪恶帝漫画大全 邪恶少女漫画眼镜催眠 邪恶少女漫画妖气色列漫画下载 邪恶少女漫画污污污 邪恶少女漫画邪恶帝漫画大全少女漫画大全 邪恶少女漫画无翼鸟医生 邪恶少女漫画淫三国 邪恶少女漫画隐身人的邪恶欲望 邪恶少女漫画无翼鸟之熟睡 邪恶少女漫画妖气色列漫画 邪恶少女漫画邪恶帝漫画大全少女漫画 邪恶少女漫画无翼鸟工口漫画大全 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 元宇宙:我从现实挑演员 万妖归位 你听过吗? 人族天道 神兵小将之天下归心 欧博官网 亚星游戏官网 亚星官网 欧博官网 澳门葡京游戏官网 邪恶少女漫画无翼鸟之熟睡中的姐姐 邪恶少女漫画行转换 邪恶少女漫画隐形机 邪恶少女漫画污污污. 邪恶少女漫画樱fate 邪恶少女漫画妖气色列漫画 邪恶少女漫画无翼鸟知可子伯母 邪恶少女漫画校园啪 邪恶少女漫画妖气色列漫画下载 邪恶少女漫画遥控震动 邪恶少女漫画妖气色列漫画 邪恶少女漫画无翼鸟医生 邪恶少女漫画遥控震动 邪恶少女漫画隐身人的邪恶欲望 邪恶少女漫画无翼鸟和姐姐 邪恶少女漫画行转换 邪恶少女漫画邪恶帝漫画大全少女漫画大全 邪恶少女漫画樱fate 邪恶少女漫画无翼鸟之熟睡中的姐姐 邪恶少女漫画仙 邪恶少女漫画无翼鸟知可子伯母 邪恶少女漫画无妈妈 邪恶少女漫画眼镜催眠 邪恶少女漫画遥控震动 邪恶少女漫画仙 邪恶少女漫画无翼鸟和姐姐 邪恶少女漫画无翼鸟工口漫画大全 邪恶少女漫画邪恶帝漫画大全少女漫画 邪恶少女漫画无翼鸟和姐姐 邪恶少女漫画无翼鸟之熟睡