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
公主化妆游戏芭比娃娃给跑步游戏叫什么公主化妆游戏芭比娃娃公主的游戏一公主的指甲化妆游戏公主滑冰场小游戏跟生死狙击一样的游戏公主化妆游戏芭比娃娃给女生猜的小游戏防御游戏全集下载防塔游戏大全在线玩公主化妆游戏芭比娃娃飞马摆放设计游戏防守小游戏外国公主画画课游戏防御游戏全集下载跟偷菜一样的游戏公主的指甲化妆游戏下载公主的指甲化妆游戏下载公主的美发游戏大全给跑步游戏公主的指甲化妆游戏下载给女生猜的小游戏公主爱美丽游戏公主的指甲化妆游戏公路摩托单机游戏公主的游戏一公主爱美丽游戏公主的美发游戏大全飞马摆放设计游戏四百年前,流光降世,蓝光星上,变异横生。 我于绝望之中重生,化身吞天噬地之主!顺者凡,逆为仙,逆则再逆皆为魔 自古仙魔两立,可谁知仙就是魔,魔便是仙!正义并非是仙,邪恶并非是魔 左右他们的乃是 心!!!  主角李磊是一位起义军首领,在机缘巧合之下从人飞升成仙,本以为仙道前途光明,可谁知这才是地狱的入口 李磊不甘堕落,一怒废仙立魔,仙魔大战一触即发,可自古仙道处处打压魔道,魔道已经危在旦夕,主角能否力挽狂澜捍卫真正的正义,改变那恒古不变的结局……在人生鼎盛,人来人往的街道上,影子拖沓的交杂着,一道道影子观看着人类,这时一旁的工人起了一瓶啤酒,少年婉拒回答到,村里不让饮酒。徐弘文本是一个工地包工头,后来世人称他披肩客之神,一个可以影响全球物价走势的神级大佬。 为了接工程,他小小年纪熟悉各路潜规则; 为了拿项目,他只身一人手持板砖大战钢管队; 为了签合同,他带领兄弟干翻亚丁湾南岸索马里海盗; 为搏,,,红颜一笑,他改变世界时尚风向。。。。。。 顾潇一次意外穿越到了500年后,获得了没有名字的系统,可以通过抽奖、签到、做事,获得奖励,并且能量值可以兑换很多物品,更为逆天的是,只需要交好或收服一名系统拥有者,就能选择此人所系统的一项功能。 然而五百年后的世界,顾潇无一不感觉陌生,米国研究出了超级士兵血清,西盟研究出了生物基因改造。而夏国在2030年在多个科技领域领先米国,使得全球将要打破的和平又一次回归和平,几百年的发展,各小国附属大国。而世界前方的强国,已经征服了火星,使火星改造成了宜居星球。至于远一点的颗星球,正在被机器人们不断的挖掘着…… 癌将被攻破…人类平均寿命延长至100岁,长命百岁已经不是说说。 后来顾潇发现,不只是他穿越了500年后,甚至还有2100-24年的,不仅如此,穿越者、重生者、轮回者,都将出现。 顾潇获得系统在这个世界的第一个任务就是掌握整个太阳系,而多年后将会有外星种族来临!不会有什么抹杀惩罚,没有被制定的命运走向这是一个神魔妖仙佛并立的世界,这是一个诸天万界混乱的年代,苍灵神尊销声匿迹之后,诸天万界混乱不堪,各方势力雄踞一方,硝烟四起,混战不断。 数千年后,他的出现改变了诸天万界战乱的时代,他的出现也引领了一个新的时代,斩天道,踏轮回,出生平凡的他,有着远大的抱负,不屈服于命运的安排,突破上苍的桎梏,他的逆天征途将由血骨铺路。故事始于二十世纪九十年代中期,大学生陶弥渡在列车上结识了同去南方的两位演员欧阳秋歌和戴玲,经历种种人生百态、风风雨雨。描写他们的友情、爱情、婚姻、事业。深入刻划他们之间的悲欢离合、爱恨情仇。 一次失败的实验造就一缕不朽道魂,一道未知的波动送来神秘的道瓶。 早年父母无故失踪,平凡却又不平凡的他终究踏入了这个无限精彩的世界。聚八方英豪,汇天下风云。大道三千,又何惧前路艰险,一刀在手,登临世界之巅! 男儿笑江湖,浮华本是空。傲天下,凛然长刀,怒斩千雄。 巅峰忆峥嵘,英雄本无梦。待他日,三尺青锋,血染长空!所有的事从一场车祸开始欢迎来到第一年级! 这个学院会有许多不一样地方。例如拥有一只可以帮助战斗的精灵、”期末考试“是战斗排位赛等等。 这个学院也会有许多相同的地方。都有老师,打破了学校的东西都要赔偿,考试都会不及格等等。 那么现在,请收拾好心情。迎接新学期的开始吧!
我比灵气先复苏 术创世之末日篇一 至幻 居然有个高手:鬼江湖 花雪漫清依 烬中诗 神武灵狱 一不小心留在了人间 淘宝万界 玄幻:我,天命大主角 神降谕旨 手握天地 终究成了懦夫 边际辰汐 守护者与猫头鹰 我在仙界学修仙 我在古代直播带货 盗墓诡异录之九层古冢 盲侠应龙 红尘有缘 公车h游戏ch 防御游戏全集 跟偷菜一样的游戏 公主的指甲化妆游戏 公车h游戏ch 公司活动小游戏视频大全集 给男生穿衣上的游戏 房间装扮手机游戏 公路摩托单机游戏 房间装扮手机游戏苹果 给女生猜的小游戏 给女孩脱衣服小游戏 跟小孩在床上玩的游戏 防御游戏全集 公主滑冰场小游戏 公主的指甲化妆游戏 给男生穿衣上的游戏 公路摩托单机游戏 给跑步游戏 公主化妆游戏芭比娃娃 防御游戏全集 公主画画课游戏 给跑步游戏叫什么 防守小游戏外国 防御游戏全集下载 跟小孩在床上玩的游戏 公路摩托单机游戏 给跑步游戏叫什么 给跑步游戏 公路摩托单机游戏 公主的指甲化妆游戏 防御游戏全集 公主画画课游戏大全 公主滑冰场小游戏 公主爱美丽游戏 公主的指甲化妆游戏 公主画画课游戏大全 跟偷菜一样的游戏 跟小孩在床上玩的游戏 公主画画课游戏 公主的游戏一 房间装扮手机游戏苹果 公主的美发游戏大全免费下载 给男生穿衣上的游戏 防守小游戏外国 防御游戏全集 给女孩脱衣服小游戏 公主的游戏一 跟小孩在床上玩的游戏 跟生死狙击一样的游戏 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 璃水的雪 我的一米书屋 签到几亿年,他无敌啦! 开局:永动机反物质 神诡世界,一刀劈开生死路 亚星管理平台 亚星官网 万利官网 亚星管理平台 澳门葡京官网 跟生死狙击一样的游戏 公主的指甲化妆游戏下载 给跑步游戏叫什么 给跑步游戏叫什么 防御游戏全集 防御游戏全集 公主的指甲化妆游戏 跟老人玩的游戏下载 防御游戏全集下载 给女生猜的小游戏下载 公司活动小游戏视频大全集 公主的指甲化妆游戏下载 房间装扮手机游戏苹果 公路摩托单机游戏 防塔游戏大全在线玩 公主的美发游戏大全免费下载 公主的指甲化妆游戏下载 公主的指甲化妆游戏 给跑步游戏 给跑步游戏 防塔游戏大全在线玩 防塔游戏大全在线玩 公主的游戏一 公主的指甲化妆游戏 防御游戏全集下载 房间装扮手机游戏苹果 给男生穿衣上的游戏 公主的美发游戏大全 公主画画课游戏大全 公车h游戏ch