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
民居邮票邮票互动网中国邮票女幽灵 百度网盘下载 迅雷下载生肖邮票民居邮票邮票交易所邮票市场邮票网邮票收藏卜慧书是一名落魄青年,嗜读书,被人成为“痴疯子”。无意功名,也不近女色。擅长办案,只因在义田获得银指环,上写“雅威”二字。之前襄阳镜湖湖口发现一具男尸,身上并无伤痕,可能落水而死。乡民发现后,就向地保报告了情况。地保请代言人撰写一纸呈文报官,代言人则索取1000两银子作为报酬。地保一则没有那么多钱,二则也不太愿意,故而只肯出200两银子。痴疯子便草草写了一张“镜湖口,发现浮尸一具”的呈文。后来情况如何?代言人如何处置?敬请期待....... 孟婆说我在阳间的寿命没超过24小时,不给予办理投胎业务。 而我当了十八年的鬼,终于等来家里给我烧了一间小卖部。 我意外发现这件小卖部通阳间,可以从阳间进货,拿到阴间来卖。 从此以后我便就做起了阴阳两界的生意,叱咤阴间。 和乔老爷一起卖手机,和扣比一起打篮球,但阎王竟然不要我投胎?他,长生王者,为了却心愿,乘兴而归,甘愿伴她左右,护她周全。 为她,逆了天下,只为一言之诺,蓦然回首,踏血而歌! 为她,亡了诸国,只为一怒红颜,腥风血雨,血染皇城! 三世浮沉,阴阳伴生,梦入仙道,圣火长明。仰望仙道尽头,你我的命运在何方? 纵观古史,谁为棋手谁为棋? 在这一场浩瀚无边的仙道棋局中,多出的一子,究竟是棋手还是棋子?这是一片集神魔、战争、悬疑、爱情、亲情、兄弟情的长篇魔幻故事小说。 当你看到神魔篇时会让你毛骨悚然;当你看到战争篇是会让你热血沸腾;当你看到悬疑篇时会让你欲罢不能;当你看到爱情篇是会让你觉得爱情是如此甜蜜与痛苦;当你看到亲情篇时会让你感到有亲人是如此幸福与温暖;当你看到兄弟篇时会恨自己怎么没这样的好兄弟。小说剧情流畅、不突兀,就算你看到神魔这样的玄幻,也会发出一声感叹:噢!原来真的是这样!我希望这部作品能涵盖上至弘达庄严的创世神话,浪漫史诗,下至充满奇趣的凡间故事,中国五千年的悠久历史,展现了宏大的画卷,波澜壮阔的背景,开拓了我们的想象力,让我们看到了人性的光辉。深邃的思想,和人性的真实。 “老子不干了,我要去度假,你爱怎么管就怎么管&amp;quot;“可是老板…&amp;quot;还没等时空鸡说完小金刚就插上话:“那你就是代理老板了,给我管理好这个时空,我直接摆烂就是玩&amp;quot;说完小金刚傅便穿越时空,只留下时空机在那呆呆地站着一觉醒来,获得进出异度空间异能。小岛长,土地肥,开启空间种田模式。 “以三个月为限,你若实现一个亿的小目标,就允许你追求我!” 白落雪一语成谶。 到期了,陈凌宇为何不追?他不会是忘了吧?破碎的竹简,修改历史。接续的断玉,破茧重生。华夏大地的历史一次又一次的变幻,究竟哪些是真哪些是假。穿越各大王朝,一个终极的秘密即将揭开。两个组织的碰撞,守护华夏历史的责任。待我将这一切缓缓道来。
邮票网 龙邮票 邮票收藏 邮票图片 邮票行情 邮票收藏价格表 香港回归纪念邮票 生肖邮票 邮票互动网 邮票网 中国邮票 邮票行情 邮票收藏价格表 邮票互动网 邮票收藏 女幽灵 百度网盘下载 迅雷下载 民居邮票 邮票收藏价格表 鸡年邮票 邮票图片 鸡年邮票 猴年邮票 女幽灵 百度网盘下载 迅雷下载 大龙邮票 香港回归纪念邮票 奥运邮票 南京文交所钱币邮票交易中心 邮票行情 龙邮票 欧美群迅雷下载 龙邮票 欧美群迅雷下载 鸡年邮票 邮票行情 猴年邮票 邮票吧 欧美群迅雷下载 第三轮生肖邮票 香港回归纪念邮票 文革邮票 从超神开始的旅行者神御,焰之祖红尘借道轮环天荒:地煞篇衍天道诀萨伽索之隐秘真相异世浮生绘行轧大陆成神记师叔亿点强,师侄们全是气运之子!我真的没有灵力当年塔里九本书名侦探柯南之双重命运泄密系统的群聊定河山龙尊剑帝九州之云起龙骧天相述清水河记忆炼体十万层亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 【薇-電13228888433】皇冠登3出租 【薇-電1322 8888 433】皇冠登3出租 【薇-電132-②⑧⑧⑧-8433】皇冠登3出租 【薇-電1322 8888 433】皇冠登3出租 【薇-電1322 8888 433】皇冠登3出租 快链加速器 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 Lets快连 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司