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
邮票市场中国邮票价格表女幽灵 百度网盘下载 迅雷下载香港回归纪念邮票邮票网中国邮票价格表鸡年邮票邮票十二生肖邮票鸡年邮票天才少年敖夜遭挚爱背叛,更是被其挖脉夺骨弃于乱葬岗。 临死之际融合祖龙精血,开启了逆天龙墟神藏。 高深的功法和武技自行修炼,更有一座座神藏等待着他去开启,有吞天霸体、有荒古圣骨、有极道帝兵... 从此逆势崛起,世家天才、豪门少主,以及诸天仙神魔,不服者统统打爆!因为一次意外,地仙界修士杨峰身陨,元婴逃出至地球夺舍一位正要自杀的青年周扬,从此开始了他在人间的传奇。秦洛昇穿越了,穿越到一个虚拟技术极度发达的平行世界。 进入《命运维度》,意外觉醒SSS超神天赋,获得升华之力和魅力值MAX。 当别人还在为爆出一件黄金装备而沾沾自喜时,他已经满身神装。 当别人还在小心翼翼的揣测NPC性格和喜好时,他已经和众多NPC推心置腹,各种隐藏任务,特殊职业,无敌技能,逆天装备,不要钱的给他送。 天下纷争,西京、启阳,北燕,鬼方四国争雄。西京国第一大江湖门派问刀门门主呼延燚,率天下门徒,纵横四海,征伐天下,无论是四国庙堂还是远涉江湖都无可避免地卷入其中。当下有些人已经习惯了这种生活,就像现在的陈默,虽然他并不属于这里。陈默穿越到了小说的世界,是一部非常热血的英雄传记类型的小说 这部小说名叫《暗影与曙光》,讲述的是一个被称为“暗夜之王”的男孩的一生,他是这座城市最强势的黑帮头目手下,也杀死过许多罪犯,是一个令人闻风丧胆的刽子手,他的名字则叫做—— 暗影·阿尔法! 原本按照漫画的发展,阿尔法会继续杀戮,直到被人制裁,但因为陈默的介入,这个男人的未来轨迹产生了变化。 阿尔法在几年前被仇人绑架,被迫参加了一次恐怖袭击,从此进入了逃亡状态,最终逃离了那座都市。 这段剧情是这本小说最大的亮点,同时也是主角的悲催之处,阿尔法身上背负着太多秘密,而且随着逃跑路程的增长,阿尔法的秘密会逐渐暴露,甚至最后会引来杀身之祸........臭狗的修炼之路,是继续摆烂还是修炼全看心情……忆往昔,青春岁月是那么不堪,我的青春,坏没坏彻底,读书书也没上好,平凡,懦弱,自卑,不甘。心比天高,命比纸薄。一个持续万余年的计划 只为对抗 第一圣人毁灭世界的阴谋 却不想其他世界的误入 让整个行动造成了无法挽回的偏差 是绝地重生? 还是陷入绝望…… 九州大陆,一个魔之子降入凡间,且看假废物,如何凭借一已之力创建自己的势力,拓展地盘,灭门派,得道飞仙,成就一番散俢传奇李问天从来没有想过,自己会以这样的方式离开拼命守护和努力战斗的家族,面对昔日的好友,族人,还有爱人,竟没有一人站出来,哪怕说上一句好话,冷眼旁观,奚落讥讽。 这一切我李问天记住了,风水轮流转,今日之辱他日必定数倍奉还!
香港回归纪念邮票 中国邮票价格表 纪念邮票 欧美群迅雷下载 奥运邮票 文革邮票 大龙邮票 世界上第一枚邮票 邮票交易所 邮票 邮票网 邮票 猴年邮票 民居邮票 中国邮票价格表 邮票网 香港回归纪念邮票 民居邮票 香港回归纪念邮票 邮票收藏价格表 邮票行情 文革邮票 中国邮票 邮票收藏价格表 邮票交易所 上海邮票网 邮票价格 奥运邮票 南京文交所钱币邮票交易中心 欧美群迅雷下载 欧美群迅雷下载 上海邮票网 十二生肖邮票 纪念邮票 邮票交易所 邮票市场 香港回归纪念邮票 中国邮票价格表 南京文交所钱币邮票交易中心 文革邮票 缘聚缘散缘起缘灭皆为天意娱乐:从密室大逃脱开始我的灵兽都是气运之子普泽林大陆神医龙婿神殿大帝无限次元打工仔异世擎天之破天长歌我的影子瞒着我,偷偷无敌一半为魔一半仙反派:开局三年之期,修罗回归剑仙:开局成为万磁王一双慧眼看大道任天高,纵我行开局捡到宇宙登陆器刚要修仙,你要渡劫了?古墓派签到十年,出关无敌绝处逢生懒九天王者荣耀外传之嘴强王者系统正在发育请主人怜惜亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星游戏官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 【薇-電1322 8888 433】皇冠登3出租 【薇-電1322 8888 433】皇冠登3出租 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 【薇-電1322 8888 433】皇冠登3出租 【薇-電13228888433】皇冠登3出租 Lets快连 - 上海曲德曲网络科技有限公司 Lets快连 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司