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
摩托车图片及价格大全图片大全图片2015款摩托车大套价格图片大全图片及价格表摩托车图片及价格大全图片大全图片大全摩托车轮胎批发价格多少钱一个摩战24号价格摩托车图片及价格大全图片大全图片2015款魔吻考维曲价格摩托车图片及价格大全图片大全图片大全摩兰都酒庄酒价格魔力挺内衣价格模具加工的价格摩托车图片及价格大全图片大全图片2015款模压硅胶市场价格模具加工的价格摩托车图片及价格大全图片大全图片大全模拟断路器价格明as原料价格蘑菇出口价格表摩战24号价格摩托车图片及价格大全图片大全图片摩力挺内衣价格蘑菇出口价格表摩兰都酒庄酒价格摩托车启动磁吸价格.摩托货运车价格及图片明月球面镜片价格多少摩托货运车价格及图片摩托车火炬火花塞价格摩托车图片及价格大全图片大全图片膜结构价格表灵气复苏的蓝星,觉醒天赋是人类最基本的。 然而在五花八门的天赋中,龙北辰觉醒了史无前例的赏金天赋! 只不过在别人眼中这天赋是一团废渣,对战力与修炼没有一点作用! 但是,九十九连败收菜的龙北辰会让众人知道,什么是顶尖天赋!正人君子赵高穿越到玄冥大陆,获得为所欲为系统,八十好感度有概率获得对方十分之一修为,九十好感度可开启为所欲为模式,满百好感度可无忧为所欲为! 别人升级靠修炼,赵高升级靠攻略,万物皆可攻略! 夫人,你也不想被我攻略后为所欲为,无法反抗吧!桀桀桀... ...... 异界门票不是爆史诗的吗?这奶罐、破面具、烤羊腿...是什么意思? 赵高看着每次从异界得到的一推破乱玩意儿陷入沉思。 ...... “三十年河东,三十年河西,莫欺少年...啊~” 赵高:小林,快,把那个喊三十年的给我带过来,别让人打死了。 ...... 大哥你好,我姓韩,在家排第六,你可以叫我小韩... 赵高,猝!...你个老六,我真是服了你了!别让我再碰到你! ...... “我为宗门流过血,我为宗门立过攻...你们不能这么对我...” 赵高:这小白怎么这么胆小? 震惊!   九旬老邪祟被当街殴打,并被捏断脖子;河畔女尸被人揪住头发,按在水里差点淹死;冤死灵童被强制劳动每天二十三小时五十九分钟,最终不堪重负,主动报案称有人虐待童工……   吴甚:大家别听外面的人瞎说,其实世界上根本没有邪祟。   众人:我信你个鬼哦,你手里抓的是什么?   吴甚看了看手里已经在翻白眼的吊死鬼,连忙发力,“蓬”的一下将其捏死,看着化为黑雾消散的吊死鬼,笑道:“诺,你们看,什么都没有,一切都是幻觉。”一个未来的地球华夏人,无缘无故穿越到异世大陆,面对着妖、魔、鬼、怪横行的灵界,人族界王的无故消失,各个组织与势力的不怀好意,他又该何去何从。末世来袭,废土之上,你我又要怎么生存!2044年的5月,比邻银河系的仙女座星系诡异的消失,引起科学界巨大的震动。在浩瀚的星空、诡异的实验舱、绯红色的晶球、高悬的山巅、紫色的光圈、迷人又恐怖的红晕。还有那庞大无比的绯红色光幕,那是承载着整个仙女座星系的意识! 科学院的研究员江晨,面对那诡异而至的梦境,视觉转移的超能力,他仿佛被冥冥之中选定,来到了一个科技极为先进的文明世界,然而在这里,他得到的第一条信息竟是:毁灭银河系…… 重回1998年,曾经暗恋的女孩青春正好,穿一条裤子的兄弟还没变成渣男,幸福美满的家庭也不像后来那么的风雨飘摇。 正是刚刚好的年纪,也正是刚刚好的时代。 起伏跌宕的九零年代即将逝去,波澜壮阔的新世纪即将到来,林白药走诡道,行霸道,悄然崛起……在遥远的玄云大陆,一位被父母抛弃的孩子,被迫成为萧家的奴隶,而他为了活下去,在萧家的禁地偷学了萧家的秘法:鬼龙爪,他将要在这片大陆走出自己的天地………该篇文章刻画了一只平凡的毛毛虫,在遇到生活中令它困惑的事时的所见所闻以及内心的想法,全篇没有跌宕起伏的情节,和我们平凡的生活相似,却暗含哲理。我叫陈宁,穿越到了九州顶级门派。 老掌门仙逝前把掌门之位传给了我。 还告诉了我一系列爆炸消息。 “大长老沧月是皇朝派过来监视门派的线人。” “二长老是天池圣地的圣女,年幼时就潜伏在门派里,作为内应,随时准备配合天池圣地里应外合。” “执法堂堂主是魔族探子,关于门派的各种秘密,已经传递出去数以万计的情报了。” “门派第一高手是个兽耳娘,是兽族扎在门派里的一根钉子,对掌门之位虎视眈眈,随时准备取而代之,振兴族群。” “就连我的贴身护卫,也是盗神的孙女,听从盗神之命,贪图门派里的财宝密藏,所图甚大!” 总之……现在门派里除了我以外,全都是卧底。 这可怎么办? 在线等,挺慌的。
流光浩劫 唐末群剑录 越空行者 都市帝仙 逆道斩神 幽游黑书 末日终结时 独狼剑士与失意世界 大晋武帝 我在人间做销售的日子 噬沙 弃子覆局 我以凡武横推邪灵世界 异梦怪谈 废材幽灵降临在我身边 超能s特队 吟剑逍遥行 风越沧海 T3 这次穿到哪? 养你杀我,将我救赎 明月球面镜片价格多少 模拟断路器价格 模具导柱价格 摩战24号价格 摩托车大套价格图片大全图片及价格表 摩托车火炬火花塞价格 模具导柱价格 魔力挺胸罩价格 明月球面镜片价格多少钱 模压硅胶市场价格 模拟忍者游戏机价格 模拟忍者游戏机价格 摩托车启动磁吸价格. 模拟断路器价格 摩托车图片及价格大全图片大全图片2015款 摩托货运车价格及图片 明德泡沫垫价格 明月球面镜片价格多少 摩托车大灯灯口图片价格 摩托车图片及价格大全图片大全图片大全 模拟断路器价格 摩托车图片及价格大全图片大全图片大全 摩托车大灯灯口图片价格 蘑菇出口价格表 魔力挺内衣价格 摩托车启动磁吸价格。 明月球面镜片价格多少 摩托车大灯灯口图片价格 摩托车大灯灯口图片价格 明月球面镜片价格多少钱 摩战24号价格 模块机保养价格 摩托车轮胎批发价格多少钱一个 摩托车图片及价格大全图片大全图片2015款 摩托车启动磁吸价格. 摩托货运车价格及图片 摩托车轮胎批发价格多少钱一个 模具导柱价格 摩托车启动磁吸价格. 铭缝缝纫机价格 摩托货运车价格及图片 魔力挺胸罩价格 摩托车图片及价格大全图片大全图片 明德泡沫垫价格 模具加工的价格 模块机保养价格 模拟忍者游戏机价格 摩托货运车价格及图片 摩托车启动磁吸价格。 明as原料价格 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 白羽沉梦洛星辰 修灵一族 暗界进化 幻宇灵荒 蓝灵沐神 亚星管理平台 亚星管理平台 澳门葡京游戏官网 亚星游戏官网 葡京官网 摩兰都酒庄酒价格 模压硅胶市场价格 模拟断路器价格 摩托车大套价格图片大全图片及价格表 摩托车启动磁吸价格。 摩托车图片及价格大全图片大全图片2015款 摩托车图片及价格大全图片大全图片 摩托车大灯灯口图片价格 模拟断路器价格 膜结构价格表 摩托车轮胎批发价格多少钱一个 摩托货运车价格及图片 铭缝缝纫机价格 模具导柱价格 摩托货运车价格及图片 摩托车轮胎批发价格多少钱一个 摩托车轮胎批发价格多少钱一个 摩托车启动磁吸价格. 明月球面镜片价格多少 蘑菇出口价格表 明as原料价格 明德泡沫垫价格 摩托车启动磁吸价格。 摩力挺内衣价格 模块机保养价格 模压硅胶市场价格 摩力挺内衣价格 摩托车大套价格图片大全图片及价格表 明月球面镜片价格多少 蘑菇出口价格表