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
国民老公带回家108漫画中国恋爱漫画排行榜漫画 报告漫画 领导佳乃漫画国民老公带回家108漫画不二漫画往期漫画漫画 报告兔女郎恶心漫画漫画干了朋友妈妈但是想结婚!bl漫画家的国民老公带回家108漫画漫画少女图片黑暗但是想结婚!bl漫画家的漫画 报告漫画干了朋友妈妈地府不良组漫画佳乃漫画佳乃漫画未亡人类型漫画贴身小女佣漫画网盘监禁小学生漫画图片兔女郎恶心漫画想念的原因那部漫画漫画被卡住的巨乳终寄语漫画多久更一次漫画 领导香港哪里卖漫画吗未亡人类型漫画漫画书的动画图片 侦察班长王珂,纯朴灿烈。平凡军旅中屡有拍案叫绝的奇遇;天道酬勤更有无数惊险之幻奇。报国军中,与老排长胡志军、战士谷茂林、梁小龙等战友结下生死情谊,再现当代战士血染的风采。从军路上,先后结识女兵吴湘豫、大学青年老师叶偏偏和抗震救灾救下的小姑娘李雪影,演绎跌宕起伏的情感故事。 西山驻训、草原备战、抗震救灾、抗洪抢险、战备值班、南疆杀敌……军旅生涯一部部传奇,作者努力描绘一个忠诚、勇敢、可爱的战士形象,以及他成长的心路历程。成长于斯倜,心悦于君侧。 全书约120万字,大部分取材于真实的的人物与事件,敬请欣赏。岚枫死后穿越修仙世界,发现金手指系统竟会吃修为。人类、异兽、亡灵,三个不同世界的种族同时遭受了灭顶之灾,在天人族的援助之下,他们进入了《寰宇》大陆。 资源的有限和欲望的无限是每个种族都要面临的矛盾,于是,一场针对人族的灭族之战开始了,人族被屠戮殆尽。 在战争的最后时刻,王任终于拿到了人族最后的希望,逆天级道具——时光尺。 伴随着系统的死亡提示,王任回到了5年前,《寰宇》刚刚开服的时刻。 王任看着活过来的时光尺,忽然明白,重生,才是人族的希望。 一条重建人族的复仇之路在他的面前缓缓展开。 这次,他要重新发起灭族之战,而灭族的对象,却不再会是人类。白小鱼本是一个平凡的甚至是悲惨的普通人,但自从那个声音出现了,一切就变得不一样......第一个求生副本:生化危机! 挑战者:四人副本! 奖励:按贡献度可获得转世重生,情报窃听,肌肉强化,幻术等奖励! 惩罚:求生副本中死去,随机剥夺自身能力,甚至是……生命! 一个声音出现在整个世界的云顶之上,犹如神明。 “现在……游戏开始!”林耀被老头子暗中定下婚事,本想下山退婚,但当看见未婚妻本人时,他态度发生一百八十度转变:“我的媳妇,竟然是冰山女神……”进入二十一世纪的第二个十年,三十六岁的李友德生活里走入三个女人:阿茹,小莉,夏梦。他在阿茹和小莉之间徘徊,等到夏梦出现,他终于做出了决定。人生里有很多无奈,特别是男女之间的感情,有的可能令人一生都不能忘记。说不上对错,有时明明知道没有结果,可仍然会让人奋不顾身的投入,留下刻骨的思念,那是一种苦涩的幸福。【诡秘双生子以局破局】   县城里不断神秘失踪的老百姓   大帅府惊现亡故的红衣九姨太   禁忌百出的民俗纸人纸马传闻   捞阴门纸人匠携手一线师、云滇巫蛊、鹰魂萨满等奇人义士将迎来一场怎样的惊险奇遇……游戏与考试有时可以实现完美结合,而道德也应该影响考试的结果,某个班级里的十五名男生也这么想。他们个个都在某些领域有着自己的专长,也有着自己致命的缺陷。他们有的出身显赫,父母都热爱读书;有的却不幸出身于一个思想境界低下的家庭,不慎被家庭影响,坠入无底深渊。突然,他们被卷入了一场场特殊的考试之中,他们需要用自己学过的知识去应对各种各样的险境。你认为他们能成功吗?故事讲述钟馗后裔钟北含冤而亡化作厉鬼,因为魔神祖先背景成为架空时代大塘的一名“阴司判官”。因家传宝玉与一千年后的子孙主角钟南跨越时空产生联系,能够被钟南召唤上身,成为钟南的“金手指”,从此一人一鬼的生存轨迹彼此交织在了一起。钟南、钟北以古今两代的宝玉本体为媒介,钟南帮助钟北在大塘斩妖除鬼、拨正乾坤。钟北帮助钟南在现代社会成就事业、匡扶正义。从此鬼成了英雄,人成了枭雄。古今两世看主角如此翻天覆地……
惊天大阴梦 剑飞大陆 龙门隐侠 热血警察 我的系统会吃修为 这个精神病居然是超能力者 巫蛊人生 神斗大陆:崛起 宠物店主不想拯救世界 梦尘烟 末世:随星而行 玄凌大陆 墓诡异志 神魄附体之开天辟地 开局超强神技:化敌为友 天煞仙旅 西岚破魔 重生之潜龙在渊 暗黑世道 元素之主 中国恋爱漫画排行榜 漫画干了朋友妈妈 地府不良组漫画 佳乃漫画 中国恋爱漫画排行榜 全职猎人漫画32卷 厌倦韩国漫画四十二 漫画肌肉美男 全职猎人漫画32卷 漫画少女图片黑暗 厌倦韩国漫画五十三 厌倦韩国漫画五十三 想念的原因那部漫画 漫画干了朋友妈妈 国民老公带回家108漫画 漫画被卡住的巨乳 3d全彩欧美无码漫画 终寄语漫画多久更一次 危命复活漫画柯南受伤 国民老公带回家108漫画 偷窥污漫画君 漫画 报告 危命复活漫画柯南受伤 监禁小学生漫画图片 漫画肌肉美男 被多轮漫画耽美 终寄语漫画多久更一次 危命复活漫画柯南受伤 贴身小女佣漫画网盘 终寄语漫画多久更一次 佳乃漫画 偷窥污漫画君 漫画 领导 国民老公带回家108漫画 想念的原因那部漫画 漫画被卡住的巨乳 漫画 被卖米的侵犯了 厌倦韩国漫画四十二 想念的原因那部漫画 漫画 被卖米的侵犯了 漫画被卡住的巨乳 漫画气泡的意思 未亡人类型漫画 3d全彩欧美无码漫画 但是想结婚!bl漫画家的 偷窥污漫画君 厌倦韩国漫画五十三 漫画被卡住的巨乳 被多轮漫画耽美 不二漫画往期漫画 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 谁还没个外挂 我真的很低调 骷髅神皇 我被关在地牢 扫黑:暗打 万利官网 澳门葡京游戏官网 澳门葡京官网 百家乐官网 万利游戏官网 人生的岔路口漫画 被多轮漫画耽美 漫画气泡的意思 人生的岔路口漫画 漫画 被卖米的侵犯了 漫画干了朋友妈妈 漫画 被卖米的侵犯了 中国恋爱漫画排行榜 漫画被卡住的巨乳 危命复活漫画柯南受伤 厌倦韩国漫画四十二 终寄语漫画多久更一次 但是想结婚!bl漫画家的 想念的原因那部漫画 但是想结婚!bl漫画家的 厌倦韩国漫画四十二 漫画干了朋友妈妈 偷窥污漫画君 危命复活漫画柯南受伤 漫画干了朋友妈妈 漫画少女图片黑暗 贴身小女佣漫画网盘 漫画书的动画图片 漫画 被卖米的侵犯了 地府不良组漫画 漫画 被卖米的侵犯了 想念的原因那部漫画 漫画 领导 3d全彩欧美无码漫画 监禁小学生漫画图片