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
龙钞价格 走势加仑子价格安庆鑫和桑拿价格漳州纹身价格表风帆电瓶105价格龙钞价格 走势32gu盘价格正常价位安庆鑫和桑拿价格16 成都洒金桃叶珊瑚价格24口全光交换机 价格雅迪豪华迅迈价格安庆鑫和桑拿价格雅迪 迅迈 价格索尼xba300价格安庆皮肤价格是多少钱24口全光交换机 价格洛杉矶到纽约的机票价格沙甜桔的价格沙甜桔的价格高温瓷像打印机价格表qefit皮草价格沙甜桔的价格16 成都洒金桃叶珊瑚价格7075铝合金 价格风帆电瓶105价格巴西亚 价格大清银币价格 20167075铝合金 价格高温瓷像打印机价格表雅迪 迅迈 价格方铭入赘刘家三年,成了整个秦州人尽皆知的废婿。 一场诬陷竟意外导致他祖传玉佩被融合激活,方铭一朝觉醒,一双神瞳能鉴世间万物。 奇珍异宝在我手,古玩界里任遨游,纵横都市我为王。 方铭:“我真的只想安静的做个废婿!可实力真的不允许啊!”修真成仙最重要的因素是什么?   资质、功法、法宝、丹药? 是,但不全是!   修真成仙最重要的是机缘,是运气!只要运气足够逆天,想不成仙都不可能!   数位高级散仙的全部遗产、数之不尽的天材地宝、仙魔妖佛人五界排名第一的法宝、排名第一的天地奇珍、排名第一的修练资质、排名第一的奇功妙法?……   这些统统都不是问题!运气来了,挡也挡不住!   叶秋离的修真生涯只有一句话:仙缘在手,天下我有!在浩瀚的宇宙星河当中,有一片武斗大陆,那里有广袤无垠的土地,纵横大陆的河流。数以亿计的人族武者们需以展示自身实力来获得在这片土地生存的权利。 这是最原始的生存方式,也是最简单、最残暴和最直接的方式。每个人都必须拼上性命,输的一方将一无所有,包括女人和孩子,甚至是自己的生命。。。。。。 武元星从小便和爷爷在山中长大,他一直相信爷爷对自己的期望,那便是成为武者之神,便可随意畅游武者星空。。。。。。世界异变,天灾来临,全民穿越末日游戏! 恐怖异兽、荒野沼泽、诡异遗迹,危机无处不在! 人类只能依靠庇护所艰难生存,接受一轮又一轮的天灾洗礼! 幸好,路岩觉醒了末日生存系统,他可以无限分解制造生存必需品、无限升级庇护所! 【钢铁】+【木材】合成【钢斧】! 【石英砂】+【纯碱】+【树脂】合成【防弹玻璃】! 【合金】+【微型能源】+【变异兽大脑】合成【兽型守卫】! 当所有人都还在为生存而艰难奋斗时,路岩已经携带一身超时代神装横行荒野! “路神的庇护所是废土中最安全的地方!” “那里的城墙厚达百米,那里的资源用之不尽!那里是末日荒野中的唯一乐土!” “有生之年,我想进入路神的庇护所,哪怕只是看一眼!” 人可杀仙你敢信? 在这里,修仙不再是惟一的出路,妖、魔、鬼、神,都能成为你的修炼方向。与之相对应的他们也能选择放弃出身转为人身。 我(作者),无意间看到一个叫做颠倒模组的模组,打算叫声朋友来玩玩,刚刚进入游戏就被整的无语。金安城接二连三发生诡异死亡案件,到底是恶灵作祟还是有人故布疑阵?  在无比寂静的黑夜中,是什么在黑暗中低语?   夜夜笙歌的都市下,那暗处不为人知的小巷你又可曾注意?   在神鬼交融波及的世界中,妖怪?鬼怪?怪物?都已经慢慢的浮出水面。   我只有一刀,在这万般沉沦,遥是苦海的世界中斩出一道惊芒!陈晨穿越到平行世界,觉醒娱乐系统,成为娱乐顶流。 本以为从此数钱数到手抽筋,系统却加以限制。 在捐够100亿之前,他每个月只能领到2000块的生活补助。 网友们惊奇的发现, “版权费几百万,陈晨居然还住在这么破的小区?” “跟女星一起出去,陈晨竟然请她吃地边摊。” “陈晨吃泡面他连火腿肠都不加!” 某天,捐款被发现,网友震惊。 “我们学校的晨曦楼居然是他捐的?” “振州特大暴雨捐了2个亿的居然也是他?” “原来,陈晨这么节俭只是为了做慈善。” 网友直呼,陈晨这明星真能处,有钱他是真捐啊。公元2035年,全球爆发生化危机!人类在退无可退之下动用了原子武器,然而丧尸并没有被大量消灭,反观人类自身不断的收到辐射而变异!人类为了自救,集中最顶尖的生物专家研究改善基因的药剂,但与此同时,另类科研人员也终于攻克人类基因壁垒,人与动物结合成为现实!非人,非神,非魔,非畜,非羽,非鳞! 主角李伤,一苦逼创业青年,走尸山,淌血海,闯地狱,戏红尘!一步一个脚印的艰难挣扎在末世,能走出一个什么样的道路,闯出一个什么样的名堂,拭目以待!
魔鬼崛起 我成为道士以后 我在末世有栋楼 三中抑智团 西游之通天大圣 取名真的好难 全民领主:开局随机神话巨龙 爽!时空淘宝让我成为人皇 神宠御兽 嗜血苍生 我用卫生纸拯救世界 潇洒小魔医 羽毛球无敌的我只能穿越了 史上最强直播间管理员 拯救地球之异世奇遇 从霉运开始的神豪 天启之神乱寻道 雾镜夕阳 九天界限 终末残响 一轮十二全最新价格 85万-120万 雅迪迅迈时尚版价格 洛杉矶到纽约的机票价格 风帆电瓶105价格 一轮十二全最新价格 85万-120万 邮票1998-1邮折价格 32 GU盘价格 大棚棉被价格 大棚棉被怎么样 巴西亚 价格 雅迪迅迈48v20ah价格 16 成都洒金桃叶珊瑚价格 飞利浦恒温吹风机HP8235价格图片 专业的门头店招制作价格 雅迪迅迈时尚版价格 龙钞价格 走势 风帆电瓶105价格 32 GU盘价格 巴西亚 价格 婴姿坊价格 安庆鑫和桑拿价格 雅迪迅迈时尚版价格 安庆皮肤价格是多少钱 加仑子价格 索尼xba300价格 24口全光交换机 价格 专业的门头店招制作价格 巴西亚 价格 加仑子价格 婴姿坊价格 巴西亚 价格 风帆电瓶105价格 雅迪豪华迅迈价格 漳州纹身价格表 龙钞价格 走势 7075铝合金 价格 风帆电瓶105价格 漳州纹身价格表 洛杉矶到纽约的机票价格 专业的门头店招制作价格 安庆皮肤价格是多少钱 大清银币价格 2016 雅迪迅迈48v20ah价格 保尔水晶杯所有图片及价格 32 GU盘价格 索尼xba300价格 雅迪迅迈时尚版价格 飞利浦恒温吹风机HP8235价格图片 大清银币价格 2016 专业的门头店招制作价格 32gu盘价格正常价位 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 苟且偷生猥琐发育 仇恨效应 最后纯血统 我在登基典礼上被截胡了? 弃婿柴小明 皇冠登3出租 亚星管理平台 澳门葡京官网 皇冠登3出租 亚星官网 婴姿坊价格 7075铝合金 价格 沙甜桔的价格 雅迪迅迈48v20ah价格 巴西亚 价格 雅迪豪华迅迈价格 保尔水晶杯所有图片及价格 铁骨丹价格 风帆电瓶105价格 婴姿坊价格 婴姿坊价格 雅迪豪华迅迈价格 雅迪迅迈时尚版价格 大清银币价格 2016 雅迪 迅迈 价格 24口全光交换机 价格 qefit皮草价格 32 GU盘价格 高温瓷像打印机价格表 大棚棉被价格 大棚棉被怎么样 一轮十二全最新价格 85万-120万 龙钞价格 走势 qefit皮草价格 风帆电瓶105价格 7075铝合金 价格 qefit皮草价格 雅迪迅迈48v20ah价格 索尼xba300价格 雅迪豪华迅迈价格 漳州纹身价格表