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
男生过生日的唯美图片大全集轮上系列漫画图片大全图片大全图片欣赏男生卡通哭泣的图片唯美图片大全流行超清图片大全绿色的风景头像图片大全男生过生日的唯美图片大全集手好看的漫画图片大全图片大全男生卡通哭泣的图片唯美图片大全狗狗头像唯美图片大全可爱微信头像开心美女头像图片大全唯美绿色墙面图片大全男生过生日的唯美图片大全集手机屏保霸气黑色带字图片大全绿色墙面图片大全男生卡通哭泣的图片唯美图片大全qq头像带字动画图片大全唯美图片大全图片大全集手绘背影卡通女孩图片大全集绿色的风景头像图片大全绿色的风景头像图片大全大猩猩跳舞的动态图片大全手绘高圆圆微笑头像图片大全图片绿色帽子高清男头像图片大全图片大全图片大全集狗狗头像唯美图片大全可爱短头发的动漫女孩图片大全图片大全漏背动漫图片大全图片骂人的带字图片图片大全流行超清图片大全风景配古诗图片大全集大猩猩跳舞的动态图片大全各种美食动漫图片大全图片大全图片大全图片欣赏 2034年,位于华夏北方的俄国突然联合死敌M国攻打华夏,后发展为第三次世界大战。一切都来源于一个巨大的利益旋涡,一场牵扯了整个蓝星文明的阴谋逐渐浮出水面......这是发生在一个架空世界『塞图尔』的故事,在这个世界,所有的物种都有成为神的机会。当然是有条件的,拥有『武装』,这些拥有武装的人都被称为『武装者』。在这个世界,分为『兰科特』『明华』『空』三个国家,而联盟则是三个国家共同创办的独立机构,专门培养年轻的武装者,然而许多年过去,却谁也没有发现联盟的阴谋……他高傲,但是宅心仁厚。 他低调,但是万人敬仰。 他是天启皇帝的好朋友,亿万人的心中偶像。 他的宗旨是创建和谐新大明。 嘘,不要出声,它来了……快躲起来,闭上眼睛,不要看它…… 你看到它的话,它会害怕……我本无意争锋,却被迫推上高位,在血与火中,一步步走到天的举世瞩目的高度,那么就剩下天了......来自他的故事传奇。写手一个,喜欢随手写一些玄幻类型,如有指教请来。2420年,一款国家发售的名为幻梦的游戏横空出世,主角叶枫作为一个活了两世的人,身怀重生必备金手指——系统,又能不能改变华夏乃至全世界的命运呢?明朝初期,一大批山西百姓在朝廷的强迫下迁往河南落户。其中一户王姓人家和当时的大多数迁徙移民一样,一个完整的家庭骨肉分离,不远千里跋山涉水的来到河南落地生根,历经千辛万苦,几度起落,组建起王家村。 如今已经六百多年过去了,王家村还是王家村,不过昔日的王家后人却被迫改姓成了刘姓氏族。 本书在请教了多名高龄老人的前提下,作者又查阅大量资料,保证历史事件的真实性,同时在不违背真实历史的原则下加以杜撰增加可读性,所涉及题材极广,包括但不限于历史、武侠、军事、神医、创业、命理、盗墓、灵异、悬疑玄幻、都市感情等等。 作者为这部书准备了两年多,初衷是写书,其实更想一朝一日把书中所写拍成影视剧,让王家村的历代村民万古流芳!男屌丝林凡意外车祸,却不料穿越异界,还未来得及高兴自己重生再世为人。却从记忆里发现自己是一个落漠家族的长子,虽天赋异禀却在17岁遭人偷袭丹田破碎武魂无法凝聚。随着脑海中一道系统提示音响起,林凡便有了称霸异界,问鼎苍穹的意志。还在YY的林凡被系统强制接受任务,悲惨的升级之路,爽翻天的称霸之路,一路美女如云…… 一失意大学生,因救落水女孩。不慎就义,因一玉佩穿越修真世界,成为世家公子。因本家族仇怨,仇家联合邪派三派围攻。 使老祖允命,惨朝灭门后,只有沈浩,在垂危之际。 得玉佩保护得活一命,从此沦为乞丐。 从一名小乞丐,在玉佩帮助下修炼成长,武功修成,便为家族报仇血恨。 这时玉佩异动,有股魂力。在沈浩识海相见。并告知此来目的。30万年前,有上界流寇。名为异族,流串此界,以人为食触犯天规。此乃四维生物。 来此世肆意横行,无人可挡。上界动怒,本尊带队。从七纬来此,对异族进行打击。终被消灭殆尽。剩少部躲于地下,才使此界得以繁衍。30万年后,发现异族利用灵魂力,控制三维世界人类高层,屠杀人族。 七纬至尊分魂下界。投胎转世便是沈浩,历经艰难和不尽坎坷。使沈浩了解三维源头,及空间宇宙间纬度。 以及每个生命存在条件。 明悟后边奋发修行,最终消灭所有异族。灵魂圆满,重回高维,找到了高我。达到大圆满境界。 成为了万界之主。
玄门圣医 梦宰沧溟 我开创了御兽时代 万世灵冢 诸天旅游者 逍遥小医圣 17岁的年纪 古代做奸商是怎么练成的 从高中开始的修福报生活 少主凯歌 三好学生? 携鬼修仙 千年之命 拂晓之诺瓦大陆的黎明 异世盛燕 玄界灵尊 金安死城 打穿儒道世界的莽夫 争锋千里 魔教教主张买提 骂人的带字图片图片大全 qq头像带字动画图片大全唯美图片大全图片大全集 qq素描图片大全大图 绿色的风景头像图片大全 轮上系列漫画图片大全图片大全图片欣赏 风景配古诗图片大全集 qq素描图片大全大图 鱼微信表情大全图片大全图片大全图片2015款 酷小朋友图片大全 手机屏保霸气黑色带字图片大全 沟通毛笔字图片大全 沟通毛笔字图片大全 短头发的动漫女孩图片大全图片大全 qq头像带字动画图片大全唯美图片大全图片大全集 男生过生日的唯美图片大全集 漏背动漫图片大全图片 非主流头像黑白情侣头像带字背影图片大全 骂人的带字图片图片大全 绿色衣服男头像图片大全图片 男生卡通哭泣的图片唯美图片大全 qq头少年图片大全图片大全图片 男生卡通哭泣的图片唯美图片大全 绿色衣服男头像图片大全图片 绿色帽子高清男头像图片大全图片大全图片大全集 微信头像开心美女头像图片大全唯美 qq头像动漫女生蓝色头发图片大全图片大全图片 骂人的带字图片图片大全 绿色衣服男头像图片大全图片 绿色衣服男头像图片大全图片 酷小朋友图片大全 绿色的风景头像图片大全 qq头少年图片大全图片大全图片 流行超清图片大全 男生过生日的唯美图片大全集 短头发的动漫女孩图片大全图片大全 漏背动漫图片大全图片 流行超清图片大全 qq素描图片大全大图 短头发的动漫女孩图片大全图片大全 亲子亲吻唯美图片大全 漏背动漫图片大全图片 鱼微信表情大全图片大全图片大全图片2015款 大猩猩跳舞的动态图片大全 非主流头像黑白情侣头像带字背影图片大全 绿色墙面图片大全 qq头少年图片大全图片大全图片 沟通毛笔字图片大全 漏背动漫图片大全图片 qq头像动漫女生蓝色头发图片大全图片大全图片 手绘背影卡通女孩图片大全集 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 剑帝传说之我是救世主 :忆 江湖潇湘 启程:家乡 午夜诡梦 万利官网 欧博官网 百家乐官网 万利官网 欧博官网 手绘高圆圆微笑头像图片大全图片 绿色衣服男头像图片大全图片 非主流头像黑白情侣头像带字背影图片大全 大猩猩跳舞的动态图片大全 流行超清图片大全 各种美食动漫图片大全图片大全图片大全图片欣赏 狗狗头像唯美图片大全可爱 qq头像带字动画图片大全唯美图片大全图片大全集 手绘背影卡通女孩图片大全集 绿色帽子高清男头像图片大全图片大全图片大全集 绿色衣服男头像图片大全图片 手机屏保霸气黑色带字图片大全 大猩猩跳舞的动态图片大全 大猩猩跳舞的动态图片大全 手绘背影卡通女孩图片大全集 手绘背影卡通女孩图片大全集 鱼微信表情大全图片大全图片大全图片2015款 手绘高圆圆微笑头像图片大全图片 非主流头像黑白情侣头像带字背影图片大全 qq头像动漫女生蓝色头发图片大全图片大全图片 酷小朋友图片大全 各种美食动漫图片大全图片大全图片大全图片欣赏 沟通毛笔字图片大全 男生过生日的唯美图片大全集 手绘背影卡通女孩图片大全集 qq头像动漫女生蓝色头发图片大全图片大全图片 手机屏保霸气黑色带字图片大全 鱼微信表情大全图片大全图片大全图片2015款 qq头像动漫女生蓝色头发图片大全图片大全图片 狗狗头像唯美图片大全可爱