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
助学贷款河南发放最快审核专科贷款平台分公司可以申请贷款卡吗专科生小额贷哪个软件贷款好专科生可以在网上贷款吗助学贷款河南发放谁能做专三的大学生贷款分公司可以申请贷款卡吗专科贷款吧大专生创业贷款大专可以贷款多少钱助学贷款河南发放成教大专贷款分期专科大三贷款平台分公司可以申请贷款卡吗大专生创业贷款专科可以贷款的平台专科贷款平台专科贷款平台读大学贷款要利息吗2014安徽省国家助学贷款8000专科贷款平台专科贷款吧专科生贷款30000专科生可以在网上贷款吗名校贷贷款严重性专科生小额贷哪个软件贷款好老年人能贷款买房吗大专贷款怎么贷成教大专贷款分期三界至尊因为前世情缘轮回转世,看似太平无事的天地实则暗流汹涌,在梵天,宙斯,如来,奥丁四方神族矛盾重重的情况下,空能否寻得前世爱人,君临天下?  远古时期,天地不分,一片混沌。上古大神盘古以无上神通开天辟地,自此混沌开;阴阳分,天地运行;万物孕育而生。这万物之中有一元灵,窥天地之玄机;悟众妙之法门,并创玄功于后世。此玄功一分为四,各为:清,灵,空,明四气。正是:清灵天地,空明在世。心是明镜,破天寻踪。御兽世界,御兽为尊。 星空万族,人族为尊。 赤贯妖星,异变降临。 人族崛起,踏破诸天。 穿越御兽世界,所有人都会在觉醒日的这一天,觉醒体内蕴含的御兽天赋。 只有觉醒御兽天赋,才能构建御兽空间,与御兽缔结契约,成为一名御兽师。 一名高级御兽师,在御兽世界里,享有极高地位,坐拥无尽的财富。 十年蛰伏,林轩终于在最后一次的觉醒日,觉醒了神圣级(sss级)天赋。 “哈哈,我觉醒了C级天赋,我的食铁兽刀枪不入,看它的技能,强化状态,天下无敌!” “我觉醒了B级天赋,我的黑斯蛙魅惑无比,致命梦幻!让你欲罢不能。” 看着周围同学的炫耀,林轩则不以为然。 就在刚刚,他觉醒了sss级天赋,他的技能,是无限加点。 只要他有足够的强化点,一只虫,也能直接破茧成蝶,直接进化为最终形态的天命神蝶。 当林轩召唤出自己的宠兽时。 数百米高的剑齿虎,一脚踏碎山崖…… 一只五彩斑斓的天命神蝶,一扇翅膀,整片虚空化为乌有…… 疯了吧,你的御兽能无限进化!大乾末年,工业革命刚刚完毕,天下大乱,帝国第一纨绔、当朝皇帝的外甥、帝国三等侯爵高绍义忽然觉醒了地球的记忆,本以为可以娇妻美妾,继续纨绔下去,但现在的大乾帝国风雨漂泊,外有强敌,内有昏君,保命都是个问题,高绍义无奈走上自强之路,卖了祖产开启武器兑换系统。 嘟嘟,恭喜宿主兑换成功98K两千只。 嘟嘟,恭喜宿主兑换成功155毫米重炮20门。 嘟嘟...... 靠武器兑换系统和自己的聪明才智,高绍义对内铲除奸臣,对外四处征战。 平原上数万坦克装甲车如万马奔腾一般。 海洋上百艘航母为首的三大舰队为帝国签下数百份不平等条约。 高绍义大手一挥,三军踏平一切胆敢抗天朝者! 虎石台的月光,上个世纪末期一代人的回忆……在看似平静的都市之中,还生活着一群灵异的存在,我们称呼为他们为妖。 一个少年自幼父母被妖所害,被送入基地,刻苦修炼,为调查父母死亡真相,踏上了一条未知的路。 “那就让我来宣布对你的审判结果吧。”军事法庭上,一名身着盛装的法官对着面前的蓝发少年说着,纵使是他们在审判这个男孩,纵使法庭外驻扎着一只军队随时防备着,但仍旧掩盖不住他们眼里的恐惧,只有旁边的一位白发红装少年和金色长发绿色荷叶裙的少女能带给他们安全感。 “南宫星辰,故意发动战争,致使伤亡上万人,鉴于其知错能改,并在后来的战争中发挥了巨大作用,宣判:南宫星辰流放荒地,不得王命,永世不得入法斯。”‘’南宫星辰,领罪矣‘’  朱慈睿穿越了……   直接成为了明熹宗朱由校的皇太子,而且成为商界巨擎马家的外孙,称霸沿海的郑芝龙的干外甥。   可谓之靠山硬,背景足!   就在朱慈睿准备过上奢华的皇太子的时候,他发现自己绑定了一个无敌作死系统!   从此,朱慈睿必须每天一个小作死,三天一个大作死。   总之,每天都要作死!   否则,他就得死!   从此,朱慈睿走上了无敌作死之旅一个玩世不恭的小子,因奇缘而获得特异奇能,在校园里由傻冒而一跃成名。走入社会,左右逢源,由此而暴富,走出一条自在的人生之路。信念之甲世界观下不同平行世界部分故事合集,主要是一些中短篇故事。
灵异:我与我的废物系统 轮回之孽,九世之缘 大屹武夫 天墟剑录 逃亡游戏:我被全人类通缉了 王殿 末世游轮行 灵异研究公司 从零开始当宗主 武侠五分钟 玄幻:天神圣仙 一画天下 宇宙真神 霸天魔神传 元世界:异度空间 我的团长,我的团 末世最后一人的笔记 地球重生之灵亡大陆 不怎么正经的抗日神剧 圣人不死,大盗不止 专科大学生贷款网站 大专生无抵押贷款 专科可以贷款的平台 专科贷款平台 专科大学生贷款网站 不用面签的贷款app 只看学历就可以贷款 大专大三可以贷款吗 名校贷贷款严重性 成教大专贷款分期 专科贷款吧 吉利贷款车交多少钱 专科生贷款30000 大专生创业贷款 因为国家助学贷款不良记录能消除吗 专科生可以在网上贷款吗 只看学历就可以贷款 名校贷贷款严重性 2014安徽省国家助学贷款8000 助学贷款河南发放 大专生无抵押贷款 分公司可以申请贷款卡吗 最快审核专科贷款平台 专科大三贷款平台 大专生创业贷款 专科生贷款30000 名校贷贷款严重性 最快审核专科贷款平台 2014安徽省国家助学贷款8000 名校贷贷款严重性 专科生可以在网上贷款吗 大专生无抵押贷款 专科生小额贷哪个软件贷款好 助学贷款河南发放 老年人能贷款买房吗 专科生可以在网上贷款吗 安阳大学生无息贷款 只看学历就可以贷款 专科生贷款30000 安阳大学生无息贷款 专科生可以在网上贷款吗 读专科可以贷款吗 读大学贷款要利息吗 吉利贷款车交多少钱 专科大三贷款平台 大专生无抵押贷款 专科贷款吧 专科生小额贷哪个软件贷款好 大专贷款怎么贷 谁能做专三的大学生贷款 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 失了星河 无限绝境 重生之我的爷爷制霸音游圈 道宗禁地签到百年,我横扫诸天 落跑圣女 澳门葡京官网 AG真人 快连下载 澳门葡京官网 欧博游戏官网 读专科可以贷款吗 2014安徽省国家助学贷款8000 名校贷贷款严重性 专科大学生贷款网站 谁能做专三的大学生贷款 安阳大学生无息贷款 专科大三贷款平台 专科可以贷款的平台 只看学历就可以贷款 专科可以贷款的平台 读大学贷款要利息吗 只看学历就可以贷款 助学贷款办理 大专贷款怎么贷 成教大专贷款分期 大专生创业贷款 专科大学生贷款网站 分公司可以申请贷款卡吗 专科生小额贷哪个软件贷款好 安阳大学生无息贷款 不用面签的贷款app 大学学历贷款 吉利贷款车交多少钱 专科生小额贷哪个软件贷款好 大专贷款怎么贷 老年人能贷款买房吗 大专生无抵押贷款 专科生贷款30000 因为国家助学贷款不良记录能消除吗 大专可以贷款多少钱