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
歌词 可以勇敢一点双镜的歌词·别让爱我们的人流泪歌词八一军旗红歌曲歌词歌词时而忘记时而歌词 可以勇敢一点我不想说再见什么歌的歌词别让爱我们的人流泪歌词祖海今天是你的生日歌词简谱阿 摇篮插曲简谱歌词主就有力量歌词歌词 可以勇敢一点十里桃林歌词mc深七主就有力量歌词别让爱我们的人流泪歌词彩虹歌谱无歌词张雪飞走心小卖家歌词歌词时而忘记时而歌词时而忘记时而儿歌歌词大全小猫钓鱼我要你只要你 歌词最孤独的人 梦然歌词祖海今天是你的生日歌词简谱最最 歌词下载奈何桥水别回头歌词陈思思桃花源歌词八一军旗红歌曲歌词歌词 不变的你出现在儿歌歌词大全小猫钓鱼零级iq称得上歌词破碎的竹简,修改历史。接续的断玉,破茧重生。华夏大地的历史一次又一次的变幻,究竟哪些是真哪些是假。穿越各大王朝,一个终极的秘密即将揭开。两个组织的碰撞,守护华夏历史的责任。待我将这一切缓缓道来。 天地初始,孕育造化之九塔,镇天地之混沌,衍天道之灵,构筑万界秩序,演化万界生灵。   时光飞逝,流转亿万年岁月,九塔蒙尘。   都市发展迅速,进入科技新时代,城市高楼林立,灯火通明,一位名为纪十安的少年正在密林中举起了他的弓箭。。。。。这是一个有异能的世界,常人得仙人点化成为异者,异者得到异能后杀掉在大陆作乱的妖魔鬼怪。异能有金,木,水,火,土五种,一般人一生只能使用一种。 吴晨!A市第一初中的普通初中生,意外得仙人点化身怀异技,这在常人都会以为从此走上了人生巅峰,但吴晨却拒绝了仙人,这在旁人拒绝了这种非人能力的机会仙人是看都不看一眼的,吴晨被仙人选中也跟他的身世家族有莫大的关联,他祖上就是干这一行的,他自然也要继承衣钵。他这种情况在他身边有很多却不能让常人知道,所以有秘密的组织会,特定的人被仙人点化的异能都大不相同却都在五行之中,金,木,水,火,土。而吴晨跟他们不同他可以操控这五行之中任何一种并随意切换。这也是仙人必须点化他的原因之一。仙人点化常人成为异者,异者则用仙人点化的异能收拾在和平大陆作乱的妖魔鬼怪。才有了和平大陆Z国。你也可以说他们是这片大陆的守护者![温馨提示!故事乃虚构,切勿当真,三克油]天行健君子以自强不息,地势坤君子以厚德载物,本欲碌碌一生,奈何世事无常,是向前披荆斩棘,还是任人鱼肉,且看主角在红尘滚滚中如何取舍,亲情,友情,爱情 恩义,众生百态,如何面对,新世界如何创造,旧规则怎么修改,红尘路远,行者无疆 小说情节纯属虚构,如有雷同,请多谅解他,大专生,大学学了个渣,进入社会混了个渣,为了家人,为了爱人奋起拼搏,学历不代表能力,能力不代表财力,在竞争激烈的现实生活中,面对柴米油盐酱醋茶的困惑,面对父母的一天天老去,面对爱人每天喋喋不休的唠叨,面对亲朋好友每个人都不看好,看看男主如何在从一个愤青,逐步蜕变成奋青和真男人。从前有一座大陆,叫圣洛大陆。 大陆之上有一个域,叫南山域。 南山域有个宗门,叫仙痕剑宗。 仙痕剑宗之中有一位大师兄,叫君清尘,他似乎有亿点点强,而他的故事也是从此开始。一位终日被人欺负爱书如命的少年旭東。 一天,他偶然和插班生風林寺清九结成好友。他一方面震慑于对方的高强武艺,另一方面却被其魅力深深吸引。终而进入其所在的道场——九鼎书院学习武艺。 实际上九鼎书院是武术被体育化之后无法被世人所接纳的超级一流高手的聚集地…… 旭東过着狱般的生活就此开始………龙灵大陆上人人习武,世人皆以武道强者为尊。 且看出身贫苦的穷小子如何修习武道,成为龙灵大陆上的绝世强者。高端的食材往往只需要最简单的……屠宰方法。 开具一张嘴,成长全靠吃。 你说那是神明的游戏? 在李乾看来那是他的餐桌! 怒涛骇浪中的三桅船…… 残酷淘汰的神诡游园会…… 迷雾中的异界都市…… 饕餮之力在他体内成长,喂养那股力量的便是神诡的血肉!少年成长之途,这路,通往未来的荣光,也连接了旁人的过往……
指纹名单 民国军火商 沧灵大陆 闭关百年,开局获得弑神枪 孩子们i 大晟县令 星神战天记 龙啸残阳 中都魔案 重生:一念三千 诡道至尊 光遇, 最完美的犯罪 女总裁的贴身近卫 重生:回到过去当医圣 携酒上吟亭 雁的历程 反派剧本:我的宠物是女帝 让你代管经纪公司,怎么都成巨星了 凌机 陈思思桃花源歌词 彩虹歌谱无歌词 张雪飞走心小卖家歌词 歌词时而忘记时而 双镜的歌词· 歌词 不变的你出现在 松烟入歌词 我们好好爱歌词 金 火红的撒日郎歌词 十里桃林歌词mc深七 年的歌曲恭喜歌词 年的歌曲恭喜歌词 最最 歌词下载 彩虹歌谱无歌词 歌词 可以勇敢一点 奈何桥水别回头歌词 带你去旅行歌词文件 lrc 陈思思桃花源歌词 永远鲍比达歌词 别让爱我们的人流泪歌词 我们不要再见面歌词音译 别让爱我们的人流泪歌词 永远鲍比达歌词 最孤独的人 梦然歌词 阿 摇篮插曲简谱歌词 破晓电视主题曲歌词 陈思思桃花源歌词 永远鲍比达歌词 我要你只要你 歌词 陈思思桃花源歌词 歌词时而忘记时而 我们不要再见面歌词音译 八一军旗红歌曲歌词 歌词 可以勇敢一点 最最 歌词下载 奈何桥水别回头歌词 八一军旗红歌曲歌词 松烟入歌词 最最 歌词下载 我怎么拒绝歌词 奈何桥水别回头歌词 我们好好爱歌词 金 儿歌歌词大全小猫钓鱼 带你去旅行歌词文件 lrc 主就有力量歌词 我们不要再见面歌词音译 年的歌曲恭喜歌词 奈何桥水别回头歌词 破晓电视主题曲歌词 张雪飞走心小卖家歌词 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 仰望星空的蛙 末世降临:我的杀仙日常 大话龙珠:重生大王弗利萨 天革 维度守护者 欧博官网 亚星管理平台 葡京官网 百家乐官网 万利游戏官网 我们不要再见面歌词音译 主就有力量歌词 社会驻义好歌词歌谱完整 年的歌曲恭喜歌词 双镜的歌词· 歌词 可以勇敢一点 我怎么拒绝歌词 歌词 可以勇敢一点 零级iq称得上歌词 别让爱我们的人流泪歌词 奈何桥水别回头歌词 十里桃林歌词mc深七 破晓电视主题曲歌词 火红的撒日郎歌词 主就有力量歌词 松烟入歌词 年的歌曲恭喜歌词 带你去旅行歌词文件 lrc 彩虹歌谱无歌词 儿歌歌词大全小猫钓鱼 我怎么拒绝歌词 年的歌曲恭喜歌词 十里桃林歌词mc深七 阿 摇篮插曲简谱歌词 火红的撒日郎歌词 我们好好爱歌词 金 张雪飞走心小卖家歌词 双镜的歌词· 张雪飞走心小卖家歌词 奈何桥水别回头歌词