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
贷款银行利息几月还贷款一百的网贷口子贷款优惠利率第三套房贷怎么贷款利率抵押贷款 用于房贷贷款银行利息几月还贷款下来晚了算违约吗贷款优惠利率贷款要提供银行流水抵押贷款用于买房吗抵押贷款每个月要还款贷款银行利息几月还贷款侠有下款的吗抵押贷款每个月要还款贷款优惠利率抵押贷款用于买房吗贷款信用卡怎么激活抵押贷款 用于房贷抵押贷款 用于房贷贷款一万逾期算诈骗吗贷款业务员可以兼职么抵押贷款开始还款时间贷款延期会有什么后果贷款一万需要什么意思抵押车贷款利率贷款40万25年月供多少第三套房贷怎么贷款利率贷款一万需要什么贷款一万逾期算诈骗吗贷款下来会通知吗异界的国度妖魔苏醒,那里即将面临生死劫难,轩辕庄就是摆脱生死劫难的寄托。轩辕庄自己在非凡经历得以砥砺成长。在这个钱财纵横的时代,没有钱你什么也不是,但是我史上最强富二代…… 美女成群,家族底厚。你跟我比!呵呵……我本是剑道门派一名不起眼的弟子,一次机缘巧合下得到了一根笛子,那一天一切都变了……王龙本是地球上的一个业余作家,一天写书猝死,穿越到了玄武大陆,绑定了爱的系统,接着从一个弱弱书生,摇身一变,成了一个无所不能的武者。 武者,一共有10个境界:小草,小河,大江,大海,人王,大地,天空,爵王,天帝,武神。每个境界,又分为了三个小等级。 王龙为爱,可以放弃一切,为爱,可以不惜一切,总之一句话,如此刻苦修炼,还不是为了找个人终老,有句诗是这么念的,生命诚可贵,爱情价更高,王龙就是为爱而生。男主顾易意外穿越到大楚帝国,结果身份和现代社会还是一样平民,在大楚帝国一次意外中获得了系统辅助,完成任务直接一路飙升,咸鱼翻身为一大楚帝王。《统宇之主》讲述的是围绕煴琴古苑所经历的曲折剧情,煴琴古苑创始人李志煴和爱妻苏菀琴为了保护古苑,更为了东刹国国泰民安、天下和祥,与各方诸国、邪恶势力斗智斗勇,最终因寡不敌众而牺牲自我的大义精神,虽身陨、留青名。所幸留的一子,李夙煴,与小穆族族长之女穆玉琴一同进入东侠武苑修学武道剑法,后历经重重磨难,生死考验,闯诸国,历经奇异宝地,最终结为夫妻,相知相守,复兴煴琴古苑,救民于水火,一统天下的故事。待到一统天下之后,此片异界大陆面临崩溃的边缘,并遭受其他异界大陆的不断侵犯,李夙煴作为天命人物,号召人族,奋起抵抗,不断游走于各方异界大陆,终于悟得天命人物所承载的使命,集齐天地之心碎片,集合各方大陆元气之力,合成天地之心,以自身为载体,将散落各处的异界大陆归于一体,最后一统天宇,成就统宇之主。东方君从小无法修炼使其实力微弱,但因一次机遇,激活了体内沉睡着的黄金圣龙,就此获得了不属于这个大陆的力量,从此实力超凡。 结束了东面西方的明争暗斗,最终成为人类的第九代战神,并渡劫成真神。  月球坠落直击亚欧大陆后数千年,又称混沌年代,地球位于海平面以上之地仅为安第斯山脉一带。核辐射遍布陆地及海洋,气候恶劣,幸存之人生活得并不容易。   来到现代,海平面下降,大量陆地重见天日,但伴随着新陆地出现,还有月球人也来到安第斯山脉。   有人就会有争斗。本作品主要描写该时代两名贵族青年之间之感情以及地球人与月球人之间阵营的文化冲突,乃至战争。什么是江湖?有人说江湖是打打杀杀,有人说江湖是人情世故,有人说有人的地方就是江湖。这一天即将踏入江湖历练的小道士向着师傅问:“师傅啊,什么是江湖啊?”老道士手抚着自身白点斑驳的胡须反问到:“徒儿,这江湖中的人形形色色他们所求所需的是什么?”小道士回答到:“师傅,这江湖中的人所求的是为名为利的名利呗。”老道士点了点头的说到:“那徒儿还问为师什么是江湖?!”小道士顿时眼睛一亮的说:“江湖就是名利场名利场是江湖!!!”天道不公,我便逆天
明斯亚战歌 百炼飞升录 归去龙兮 质检女神:开局检查焰灵姬 长生三千事 最牛焚尸匠 大魔王拯救世界? 饿狼传说之灭世狼皇 将行歌 明江一剑之尸疑 驭心志 别把岁月留下 末日凑数的日子 直播:我做网红那些年 镇国利刃 都市无敌大反派 诡事异录 普通修炼 仙戮万界 这个师爷想退休 贷款40万1个月还 抵押贷款用于买房吗 贷款信用卡怎么激活 抵押贷款 用于房贷 贷款40万1个月还 贷款40万房贷分30年 贷款需要固话吗? 抵押贷款找中介靠谱吗 贷款40万25年月供多少 贷款侠有下款的吗 贷款延期会有什么后果 贷款延期会有什么后果 贷款一万需要什么意思 抵押贷款用于买房吗 贷款银行卡能更换吗 抵押车贷款利率 贷款需要填什么资料吗 贷款40万25年月供多少 贷款一百的网贷口子 贷款银行利息几月还 抵押贷款需要评估吗 贷款优惠利率 贷款一百的网贷口子 抵押贷款开始还款时间 抵押贷款找中介靠谱吗 贷款一万需要什么意思 贷款40万25年月供多少 贷款一百的网贷口子 贷款业务员可以兼职么 贷款40万25年月供多少 抵押贷款 用于房贷 抵押贷款需要评估吗 第三套房贷怎么贷款利率 贷款银行利息几月还 贷款一万需要什么意思 抵押车贷款利率 贷款有晚上放款的吗 贷款需要固话吗? 贷款一万需要什么意思 贷款有晚上放款的吗 抵押车贷款利率 贷款五年内还清划算吗 贷款一万逾期算诈骗吗 贷款需要填什么资料吗 抵押贷款每个月要还款 抵押贷款需要评估吗 贷款延期会有什么后果 抵押车贷款利率 贷款一万一个月还多少 贷款下来晚了算违约吗 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 古老吸血鬼 枫起云涌时 一条舔狗的使命 创世修心决 切面玄话 澳门葡京游戏官网 AG真人 快连下载 澳门葡京游戏官网 欧博游戏官网 贷款需要填什么资料吗 贷款下来会通知吗 贷款下来晚了算违约吗 贷款要提供银行流水 贷款一百的网贷口子 贷款一万需要什么意思 抵押贷款每个月要还款 贷款侠有下款的吗 贷款有晚上放款的吗 抵押贷款用于买房吗 贷款银行卡能更换吗 贷款下来晚了算违约吗 抵押贷款 用于房贷 贷款一百的网贷口子 贷款一百的网贷口子 贷款需要固话吗? 贷款需要填什么资料吗 贷款侠有下款的吗 贷款下来晚了算违约吗 抵押贷款找中介靠谱吗 贷款业务员可以兼职么 贷款一万需要什么 抵押贷款开始还款时间 贷款侠有下款的吗 贷款40万25年月供多少 抵押贷款需要评估吗 贷款一万逾期算诈骗吗 贷款下来会通知吗 抵押贷款 用于房贷 贷款一百的网贷口子