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
网游天谴修罗txt春生夏长秋收冬藏txt网游天谴修罗txt腹黑王爷金牌商妃txt下载丞相你要对我负责txt日本的起起落落txt妙手药师txt下载黑心佛txt下载欧也妮·葛朗台txt?爰使┯ι?txt少年总裁之校园纵横txt网游天谴修罗txt寻找前世之旅第二部txt诺言软语txt黑心佛txt下载?爰使┯ι?txt老炮儿是怎样练成的txt庸人小说txt庸人小说txt成功txt下载九皇一后txt庸人小说txt欧也妮·葛朗台txt霸道狂少txt丞相你要对我负责txt科技主宰txt下载腹黑王爷金牌商妃txt下载霸道狂少txt成功txt下载寻找前世之旅第二部txt柳岸晓月,临沂人,文学爱好者,先后发表多篇作品。十余世的轮回,一生的痴缠苦恋,究竟是为了前世的荒唐而赎罪,还是为了千年的爱恋而痴狂? 只为那双独一无二的眼眸,他心甘情愿的为之反叛仙道、颠覆魔界,走遍天涯海角,只求永世相伴。 只为那颗一成不变的真心,她无所畏惧的陪他出生入死、浪迹天涯,穿越千山万水,惟愿携手夕阳。 然而,造化弄人。原本祥和安宁的世间,却偏偏因为一个不知所以的地灵而纷乱不断。人仙魔三界中的是非恩怨,总归一个“权”字而起,一个“情”而乱,一个“痴”字而迷,一个“释”字而终。 三界本无界,不过是一花一木一世界,一树一叶一菩提,自在其中罢了!在某个时代,大陆上出现了两大种族,一个是人族,一个是魔族。一个少年,立志成为名魔法师,奈何上天给他开了个很大的玩笑。主角:神马,我是魔法师么,怎么不能使用魔法呢? 主角敌人:我擦,使用魔法使用魔法呗,怎么上来就用禁咒最次还是高级魔法。 人族:这货可以带领我们走向胜利。 魔族:这个人类很牛逼,我们搞不过他,不如派美女诱惑吧。 搞笑模式正式启动。启动加载99%。加载失败,重新加载中《革命家》系列第一部。 阿楚是最普通不过的一名中专学生,所选汽修专业,身边围绕着一群狐朋狗友,原本普普通通的一年,准备把人生一了百了解决完安稳过日子,可是却迎来改变人生命运的机会。 阿楚等了十七年,终于等来了革命。在港岛的乡下有一个九叔,收了两个徒弟,替人驱邪伏魔。 在济州岛有一个风叔,虽然是警员,但是却擅长利用道术破案。 还有在郊区一处人迹罕至的地方,有一个和尚和一个道士,传说身居神通,能驱邪灭鬼。 还有一个茅山弟子名曰傲天龙,在港岛各处游历,无数厉鬼僵尸死于他的剑下。 还有所谓的南毛北马,毛小方和马小玲,那更是灵幻界的扛把子,类似于前世武林盟主一样的人物。 一个鬼怪横行的世界,还有这么多大佬的存在,让李峰想要混吃等死的愿望彻底落空。 自颛顼绝天地通,巫妖诸族皆避世而居,人族坐享其成,崛起已是大势所趋。 但辗转数千载,诸界风云突变,整片魔洲的攻伐几乎成白热化,伏天魔主以惊人魄力统一了整个中洲地界,继而开始布局继续南下。 结果可想而知,紧邻恶魔之眼的几个天国相继沦陷,直接导致人界受到前所未有的波及。 适逢群魔当道,天魔大帝横空出世,以惊人的魄力打开了恶魔之眼,顿时引来三界劫数,西方佛庭在群魔的围攻下,独木难支,惨遭屠戮。 为此,引得天庭震怒,诸神开始极力反思之前的保守策略,转而在玉帝的授意下,开启了末法封禁之战,而这其中最重要的一环,便是去魔洲寻找曾经自诩为神道根源的不世秘密。 就这样,在诸神的安排下,曾经的王者东皇太一开启了寻找力魄的艰难之旅!广袤无垠的宇宙,充满了未知,仰望星空,生命的源头在那一颗又一颗美丽的星辰上跳跃……【传统玄幻+帝君重生+剑道+热血逆袭+太荒至尊体】   万年前,东凰帝君功参造化,万古寂寞下孤身闯入寂灭剑墟,寻找最强之道,却始终没有自那片禁地中走出。 万年后,纪元迭起,轮回初开,一个被夺去灵骨的少年在奄奄一息之际,恍然间觉醒前世记忆。 苏道尘伫立在山巅,负手而立,昂首透过无尽云层望去,眼神淡漠,“这一世,我将是这诸天万族的劫!” 末日生存游戏降临。 任何人都可能被选中,进入游戏副本进行生存角逐。 规则诡异的废弃都市、危机重重的远古沼泽,步步杀机的荒凉大漠...... 一朝被绑票的裴墨忽然被游戏选中,危难之际觉醒末日虫巢系统。 当其他人还在为生存发愁之时,他已经融合虫巢,制造BOSS级种属——刀锋女王! “虫族别的特长没有,就是暴兵够猛!” 暴君、撕裂者、腐蚀者、坦克虫、电浆虫…… 当其他玩家小心翼翼,步步维艰之时。 却见裴墨的虫族大军已经铺天盖地,席卷了整个末日世界。重生在了天道即将崩溃,鸿钧三清远走寻到,天地王母受援以进,现代科技飞速发展,对于修行却是半开放的世界,江屹煊被选为了复苏天道的棋子。 对于这些,江屹煊有话说:“我只想把仙丹当糖豆,把八九玄功当炼体术,让亲人无病无灾。用真火来炒菜,用灵泉当家庭饮用水,让石材释放出它最美味的口感。对于复苏天道什么的,谁爱作谁作,我没兴趣!”
次元草书 反派能有什么怀心思 阴棺借道 帝哥不要宠猴了 铁血星途 赛尔号之清玄灵地 诡成仙 三色玫瑰 青春期的回忆录 剑灵之洪门传说 海贼之审判 末日:最强能力者 济世医侠 九天神帝 疑与智斗 神下斩龙坡 诡丧之城 恐怖世界:我比厉鬼还诡异 果宝特攻之时空穿越 星空漫游者 平生不晚txt 华夏战龙txt在线阅读 老炮儿是怎样练成的txt 丞相你要对我负责txt 平生不晚txt 锦瑟华年txt新浪下载 无上真魔txt皇甫奇下载 大唐明月1txt 科技主宰txt下载 寻找前世之旅第二部txt 欧也妮·葛朗台txt 教你唱歌txt 轮回三部曲txt 华夏战龙txt在线阅读 日本的起起落落txt 丞相你要对我负责txt 无上真魔txt皇甫奇下载 科技主宰txt下载 九皇一后txt 网游天谴修罗txt 华夏战龙txt在线阅读 黑心佛txt下载 春生夏长秋收冬藏txt 诺言软语txt ?爰使┯ι?txt 轮回三部曲txt 科技主宰txt下载 春生夏长秋收冬藏txt 九皇一后txt 科技主宰txt下载 丞相你要对我负责txt 华夏战龙txt在线阅读 安晴小说txt 日本的起起落落txt 霸道狂少txt 丞相你要对我负责txt 安晴小说txt 老炮儿是怎样练成的txt 轮回三部曲txt 黑心佛txt下载 腹黑王爷金牌商妃txt下载 利诱txt下载 盛世甜婚txt 教你唱歌txt 诺言软语txt 华夏战龙txt在线阅读 教你唱歌txt 腹黑王爷金牌商妃txt下载 轮回三部曲txt 妙手药师txt下载 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 末世无敌之圣职者不是奶妈 玩转大明帝国 亓:凭依各地的梦战 武综大冒险 僵尸之灾 快连下载 亚星管理平台 亚星游戏官网 快连下载 亚星管理平台 少年总裁之校园纵横txt 穿越明末当皇帝txt 盛世甜婚txt 春生夏长秋收冬藏txt 穿越明末当皇帝txt 腹黑王爷金牌商妃txt下载 春生夏长秋收冬藏txt 锦瑟华年txt新浪下载 安晴小说txt 锦瑟华年txt新浪下载 妙手药师txt下载 成功txt下载 妙手药师txt下载 华夏战龙txt在线阅读 老炮儿是怎样练成的txt 日本的起起落落txt 欧也妮·葛朗台txt 网游天谴修罗txt 华夏战龙txt在线阅读 安晴小说txt 网游天谴修罗txt 不屑凰王宠txt 黑心佛txt下载 丞相你要对我负责txt 寻找前世之旅第二部txt 庸人小说txt 锦瑟华年txt新浪下载 少年总裁之校园纵横txt 锦瑟华年txt新浪下载 欧也妮·葛朗台txt