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
真实黑帮电影抗日老电影 女主角打飞机徐少强古装电影全集长春最新上映电影美国间谍电影创戏真实黑帮电影抗战强奸电影徐少强古装电影全集电影丑小鸭介绍电影电影半夜鸡叫欧美武士血腥电影真实黑帮电影动画片大全电影免费全集观看欧美武士血腥电影徐少强古装电影全集电影电影半夜鸡叫电影什么大侠黄家驹电影 二哥黄家驹电影 二哥王晶电影风格电影版丑小鸭3d电影快播香港老电影 像四大探长范冰冰杨贵妃电影在线美国间谍电影创戏张国荣电影专题节目长春最新上映电影一个快递员的微电影王晶电影风格动画片大全电影免费全集观看 拥有光明之力者,人人崇拜的对象,黑暗之力之人,注定人人唾弃. 一个少年同时拥有光明,黑暗。 当被所有人唾弃的时候,两个女孩护他周全。他就是龙玉。万万没想到,走路也可以修练,躺着也能成为大佬。 人说:要做个有梦想的咸鱼,本想翻身,一不小心咸鱼粘锅。 哎呀!完犊子了…… 是命运的不公,还是英雄的凯歌! 两世轮回,繁华落尽! 待回首,灯火阑珊处却不见她。 传说中的手掌乾坤,脚踏星辰,御剑飞行的世界真的出现。 各种大佬,集聚一堂。 而苏洵,却身处漩涡之中。 谁是执棋之人,而谁又是棋子?天下纷争,西京、启阳,北燕,鬼方四国争雄。西京国第一大江湖门派问刀门门主呼延燚,率天下门徒,纵横四海,征伐天下,无论是四国庙堂还是远涉江湖都无可避免地卷入其中。在一个喜气洋洋的大年夜,一道身影悄悄离开了这喧闹的街市,来到了一片莽莽榛榛的原野。他靠着一棵枯树坐下。这棵树的枝干早已腐朽,稍有动静便吱吱呀呀地叫个不停,给这寂静的原野添了一种神秘又略带诡异的色彩。   可是,他似乎并不介意。远处,低矮的灌木丛中,闪烁着一点点淡绿的幽光。这一定是那些萤火虫为路人点起的灯吧。   他又抬起头。漆黑的夜空上,挂着几颗明亮的星。当然,也有一些星星是那样的忽明忽暗,飘忽不定。它们,是为了什么呢?   他想着想着,最终仍是累了,倚靠着枯树沉沉地睡去。这时,地面上传来了一阵杂乱的脚步声,越来越近,越来越近,危险,就要来了啊。    金丹成,元婴现,化婴成神,一步修仙路,逆天成真神。 数万年前人界灵气盎然,人神同修,万年大劫将至,界面薄弱,魔界魔神率众魔族破虚空入人界,誓要屠尽人族。 人界尸骨成山,血肉成河,众仙陨落,为保人族延续,众神不惜元神灭,神体破,撕碎界面,与魔族同灭。 界面破碎,形成无数小界面,灵气稀薄。魔族重燃,一个个人族界面消散…带着200级三转大法师的记忆,陆阳重生回到了十年前,命运跟他开了一个玩笑,曾经失去过的,被夺走的,他都要重新拿回来。游戏中的赚钱技巧、副本攻略、传奇任务、装备出处、图纸秘方、战斗技巧他全都知道,且看一个重生玩家如何带着兄弟们横扫万国、焚尽天下,开启一段火神的传奇! 在90年代初期,年轻的特种兵唐枫接到一次特殊的任务.....来到青城市,在这里邂逅纯真的爱情,真挚的友情,凭借他过人的睿智上演了一场酣畅淋漓的铁血柔情! 一次意外,世界顶级雇佣兵穿越到异世界,成为了银龙城附近的猎人。 十几年过去,他一直以为自己穿越而来只会成为一个闲散的猎人,每天只会钓钓鱼,抓几只兔子,摘几株药材换酒钱打发时间,最大的乐趣不过是调戏邻居的小女孩。 但在他十五岁的凛冬日,村子里最强大的猎人大胡子离奇失踪,无奈之下,庭瑞只得踏入到苍茫山脉寻找大胡子的踪迹。 越过茫茫群山,踏过无数冰雪,他终于找到了大胡子在坚冰上刻下的痕迹。 但令人费解的是,上边只留下了一个潦草的“鬼”字便再无其他痕迹。 就在林庭瑞感到疑惑沉下心思思考的时候,他的身后突然响起了喀嚓喀嚓的踩雪声…… 一介凡人意外闯入修仙世界,成为一名资质普通但向道之心甚坚的修仙者。 仙路崎岖,长生漫漫,虽千万人,吾往矣!少年苏渊经历三次凝丹失败,机缘巧合拜四圣兽之一的青龙为师,踏入武道之途,并且开启自身龙族和凤族血脉,从此天高海阔,前途无量。 探索秘境,结天骄,诛邪魔。
百缘 墨守信传 南风过境迁 浮世短篇小说集 欺世魔术 沉默的甲子 纸语术 奇剑幻魔录 娱乐:从密室大逃脱开始 龙凤令 我,魔教教主,开局镇压圣女 幽游黑书 第七黑暗 三千道法传 赵国和燕国的对决 留住青春一回眸 灵异复苏:从单挑阿飘开始 我的功法自带特效 天御族1统筹 剑仙转生 杨采妮最新电影 4d电影什么意思 电影什么大侠 黄家驹电影 二哥 杨采妮最新电影 四大探长+电影 电影 天空 王二小电影海报 张国荣电影专题节目 动画片大全电影免费全集观看 香港老电影 像四大探长 香港老电影 像四大探长 范冰冰杨贵妃电影在线 电影电影半夜鸡叫 韩国免费电影致命性圈在线 美国间谍电影创戏 电影 天空 张国荣电影专题节目 电影版丑小鸭 真实黑帮电影 4d电影什么意思 徐少强古装电影全集 抗日老电影 女主角打飞机 3d电影快播 王二小电影海报 范冰冰杨贵妃电影在线 张国荣电影专题节目 抗日老电影 女主角打飞机 电影版丑小鸭 张国荣电影专题节目 黄家驹电影 二哥 4d电影什么意思 长春最新上映电影 真实黑帮电影 范冰冰杨贵妃电影在线 美国间谍电影创戏 3d+电影+拍摄 电影 天空 范冰冰杨贵妃电影在线 3d+电影+拍摄 美国间谍电影创戏 电影选美图片 王晶电影风格 电影男主人公总在看片打飞机 3d电影快播 4d电影什么意思 香港老电影 像四大探长 长春最新上映电影 电影刺客聂隐娘影评 抗战强奸电影 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 豺狼农庄并浓妆 星星之火,可以燎原 玄幻:我能看到未来 权权之心 书隐仙踪 快连下载 亚星管理平台 亚星游戏官网 快连下载 百家乐官网 动画片大全电影免费全集观看 范冰冰杨贵妃电影在线 抗战强奸电影 电影男主人公总在看片打飞机 四大探长+电影 电影男主人公总在看片打飞机 电影什么大侠 电影丑小鸭介绍 欧美武士血腥电影 徐少强古装电影全集 4d电影什么意思 杨采妮最新电影 电影丑小鸭介绍 张国荣电影专题节目 徐少强古装电影全集 一个快递员的微电影 张国荣电影专题节目 抗战强奸电影 四大探长+电影 电影刺客聂隐娘影评 黄家驹电影 二哥 王晶电影风格 一个快递员的微电影 真实黑帮电影 电影男主人公总在看片打飞机 电影丑小鸭介绍 香港老电影 像四大探长 3d+电影+拍摄 韩国免费电影致命性圈在线 长春最新上映电影