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
与龙有关的耽美漫画274期漫画派对圆古怪兽娘漫画神妖漫画图片日本邪恶漫画女监禁蹂与龙有关的耽美漫画中国乒乓球漫画圆古怪兽娘漫画贞子色系漫画主从百合 漫画绅士漫画本子h圆古怪兽娘漫画智 喵喵咖啡厅 漫画绅士漫画本子h学校黄的漫画主从百合 漫画重口味工口漫画家日本邪恶少女h番漫画日本邪恶少女h番漫画妖气漫画网H三国日本少女漫画全集日本邪恶少女h番漫画贞子色系漫画尸兄漫画220日本邪恶漫画女监禁蹂深宫幽情漫画 网盘日本邪恶漫画 h里番尸兄漫画220妖气漫画网H智 喵喵咖啡厅 漫画文艺青年刘凡做了个梦,醒来身上竟然多出一块玉,遇疯癫老道,开启都市修仙之旅,然而一入仙途深似海,才发现原来这世界隐藏着如此多的隐士大能,每次实力提升却遇高手,一步步被逼成神。这是神魔意志与人类精神的碰撞,这是斗气与魔法充斥的世界,在牧师的祈祷与召唤师的吟唱中,天才少年龙行云带领渺小的人类,决战诸天神魔。他是骑士?他是魔法师?他是学霸?他是冒险者?他是英勇的领主?他是伟大的统帅?他是无敌的战神?不他是人类的英雄。游戏与考试有时可以实现完美结合,而道德也应该影响考试的结果,某个班级里的十五名男生也这么想。他们个个都在某些领域有着自己的专长,也有着自己致命的缺陷。他们有的出身显赫,父母都热爱读书;有的却不幸出身于一个思想境界低下的家庭,不慎被家庭影响,坠入无底深渊。突然,他们被卷入了一场场特殊的考试之中,他们需要用自己学过的知识去应对各种各样的险境。你认为他们能成功吗?偏僻小城中的少年,不为人,既成神的故事。刘墨发现了自己的爷爷是盗墓贼,他选择走爷爷的老路去探寻爷爷未知的墓,一路上结交了许多对于自己来说非常重要的朋友.湘西尸王和海底墓到底是什么关系?余亦辰的身世之谜?刘墨的爷爷为什么不要他从事盗墓?八星卧足墓的噬魂刀真的有这么厉害吗? 浮浮尘世,君子道长,小人道消,反之则反是。 当代996青年江易见义勇为,勇斗街头混混救下女孩,却终因寡不敌众被混混捅成重伤,即将昏死之际,一道阴阳八卦轮盘突然浮现于他身下...... 浮浮尘世,前途未卜,预知后事,且行且看。 武道一途,逆命而上! 人欲拦我,屠人! 神欲拦我,斩神! 天欲拦我,灭天! 道欲拦我,伐道! 命运蹉跎又能如何,三尺青锋,一剑斩之!本书正在大改,作者会尽快修改完毕。 ———— 威信公众号:竹楼听细雨 欢迎大家加入1982年的冬天,阳历11月22日,小雪。在这天,一名女婴降生在了一个背靠青山的小村庄里最西头的三间茅草屋里。父亲给她取名为“晓敏”。 四年后,也是一个冬天,父母决定把她送走,从此她的命运便开启了另一扇大门…… 童年缺失的东西,就好像是你心里有个洞,你总是会有意无意的,不由自主的去填它,最后你会发现它是个怎么也填不满的无底洞。每个人一出生便会哭泣,然后才会笑,因为人生不易。 苦难可以磨炼人的心智,悲伤最后会化为元气包裹我们的心,不再受到伤害。 我们都是普通人,我们都一样平凡,只是不一样的经历演绎不一样的命运,绘画不一样的人生! 无论怎样,请保持拥有随时微笑的能力,因为你得精彩的活着! 蓝颜玉是智族的天才,天生智力无限,精神力初始三十级。在他十三岁时,离开了智族,入了阳暮言组织的拯救者奇团,认识了妖族的小公主美琥,金刚族王子艾果……在这其中竟还有来自异族的夜墨修,他是敌是友? 在剿灭异族的过程中,花界彼岸花——慕兮月与他相识、相知、相爱。之后的几次生死之战,导致拯救者大换血,面临着土崩瓦解,蓝颜玉是否能重振拯救者奇团?在世界即将要毁灭时,他又能否拯救世界?
渡劫飞升 王奕凡的城市生存 重生之我有司马家三百死士 理想国的破灭 法规世界 人狼学园 我是星际探险家 活脱优雅 卡恩的真实阿拉德之旅 未知镜头 在打牌的世界散播致郁 开局靠骑单车致富 我自异世而来 抑郁者的世界 阳春暮雪 高武:我和我的天命系统 被当成废人传送到异世界? 洪荒:家兄冥河,我稳健成圣! 废土之上 茅山道徒 少女邪恶漫画之夏娜 妖精的尾巴漫画500话 重口味工口漫画家 日本邪恶漫画女监禁蹂 少女邪恶漫画之夏娜 怎么看纲手邪恶漫画 重口味工口漫画家 奇迹时代漫画 深宫幽情漫画 网盘 主角叫北川的侦探漫画 肉漫画 兽x美少女 肉漫画 兽x美少女 玄铁什么漫画 妖精的尾巴漫画500话 与龙有关的耽美漫画 日本邪恶漫画女监禁蹂 最新流氓漫画 深宫幽情漫画 网盘 杀爱漫画图片 圆古怪兽娘漫画 妖精的尾巴漫画500话 学校黄的漫画 274期漫画派对 绅士漫画本子h 主从百合 漫画 玄铁什么漫画 深宫幽情漫画 网盘 274期漫画派对 杀爱漫画图片 深宫幽情漫画 网盘 日本邪恶漫画女监禁蹂 妖精的尾巴漫画468 神妖漫画图片 与龙有关的耽美漫画 尸兄漫画220 日本邪恶漫画女监禁蹂 神妖漫画图片 重口味工口漫画家 玄铁什么漫画 学校黄的漫画 日本邪恶漫画 h里番 主角叫北川的侦探漫画 叶精作漫画大合集 最新流氓漫画 绅士漫画本子h 妖精的尾巴漫画500话 肉漫画 兽x美少女 日本邪恶漫画 h里番 玄铁什么漫画 中国乒乓球漫画 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 域外天魔?本座一剑可屠! 孽 场 穿越三国之封神天下 雷帝之童养夫的崛起 魔证三千道 万利官网 皇冠登3出租 亚星游戏官网 快连下载 亚星管理平台 深宫幽情漫画 网盘 神妖漫画图片 尸兄漫画220 怎么看纲手邪恶漫画 妖精的尾巴漫画468 尸兄漫画220 叶精作漫画大合集 绅士漫画本子h 与龙有关的耽美漫画 贞子色系漫画 学校黄的漫画 贞子色系漫画 智 喵喵咖啡厅 漫画 三国日本少女漫画全集 日本邪恶漫画 h里番 少女邪恶漫画之夏娜 日本邪恶漫画女监禁蹂 智 喵喵咖啡厅 漫画 绅士漫画本子h 日本邪恶漫画女监禁蹂 肉漫画 兽x美少女 日本邪恶少女h番漫画 妖精的尾巴漫画500话 最新流氓漫画 主从百合 漫画 叶精作漫画大合集 主角叫北川的侦探漫画 叶精作漫画大合集 少女邪恶漫画之夏娜 与龙有关的耽美漫画