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
死格漫画邻居血族禁域漫画免费全集下载死式虐杀曼威漫画暗黑的破坏神漫画 邪恶218邪恶漫画之斗罗大陆死格漫画邻居谢文东小说漫画死式虐杀曼威漫画citrus 漫画百度云猥琐血腥的漫画恐怖漫画《怨灵》怨灵死格漫画邻居王牌校草漫画 删除恐怖漫画《怨灵》怨灵死式虐杀曼威漫画17pic漫画巨乳女仆漫画全集218邪恶漫画之斗罗大陆218邪恶漫画之斗罗大陆bl漫画《无忧劫》31同级生漫画老师的回忆舔熟女屁眼漫画citrus 漫画百度云街霸bl漫画邪教的日本漫画all十五漫画暗黑的破坏神漫画 邪恶英雄的轨迹漫画bl漫画《无忧劫》31校园18x漫画 星源纪元,星界得神秘力量相助,辟星源战场,发动界域之战,入侵源界。源界势微,被动防守,节节败退。危机时刻,一枚石胎由天外破空而至…… 群山之间一座小镇坐落于山谷之上,镇中倚崖而建的祠堂中,祭祀着一块黑白源胎。源胎一直交替散发着黑白光晕,源胎下放有一块刻着“御”字的玉牌。祠堂中一对夫妇,握着彼此的手,满脸期待着盯着源胎。 “终于要孕育成了吗?” “是的,要出世了!” ………… “千山!雾海的御符在涯角星域有了微弱的感应,你去将他带回来,阴阳双生石能保则保......” “是!师父。”沉眠三载,不知岁月流江。 废材?不是,是天才! 帝脉天赐,指天斥神张扬。 废体?不是,是神体!天下为敌,为伊孤战八方。 男人的尊严,需自己找回!武逆修神,古今天地至上。 神体开启,不生即死!一朝成神,纵横万载无双! 以异晶淬气,以精魄炼体!天笑我,我笑天! 神体大成,碎灭乾坤!武徒--武者--武师--大武师--武灵--武宗--武尊--武王--武皇--武圣--武帝---------------------------------------【轻松爽文,热血,扮猪吃虎。】虾米个人微信公众号有免费番外可以阅读,zhishixiaoxiami,只是小虾米拼音。深居野林神秘老道,一手培养出七位足矣撼动华夏的绝美女徒弟。今日,又一名最小男徒儿罗峰顺利出山。 罗峰:“我是老逼灯培养出最垃圾的徒弟,没什么本事,就想吃吃软饭,苟且度过这一生。” 师父:“什么,他说他最弱?难道我没有告诉过你们,那小子身怀诡秘?” 师姐:“我好像发现我们的小师弟越来越不对劲儿了,为什么世界各大强者都来跪舔他?” 一位来自于世界黑暗深处的顶级势力后裔之子,出生便被抛弃做弃子,偶遇华夏旧时代战力天花板老疯子和七位倾城倾国的大背景七位师姐,从此掌握七大绝学误入都市豪门,卷动江湖风云,走上自证强者之路。林浩穿越大秦,醒后发现自己竟欠始皇百万黄金,瞬间懵了。 逾期不还,满门抄斩? 为了自己的小命,林浩:不得不在大秦疯狂捞金。 而为了防止欠下巨款的林浩死亡,始皇变了,处处维护林浩。 林浩:贩卖官盐,建造长城,设立太子……我统统都要! 文武百官:谁给你的狗胆! 李斯,赵高:拖下去斩了! 始皇:我看行…… 文武百官,赵高,李斯:…… 始皇不公啊!!! 一次失败的实验造就一缕不朽道魂,一道未知的波动送来神秘的道瓶。 早年父母无故失踪,平凡却又不平凡的他终究踏入了这个无限精彩的世界。聚八方英豪,汇天下风云。大道三千,又何惧前路艰险,一刀在手,登临世界之巅! 男儿笑江湖,浮华本是空。傲天下,凛然长刀,怒斩千雄。 巅峰忆峥嵘,英雄本无梦。待他日,三尺青锋,血染长空!作为旁观者,记录六段也许并不普通的故事;作为等待者,是否能等待重逢的那日。这是恩怨的了解之章,也是六条截然不同的道路。最强兵王归来,竟发现家人被逼迁,一怒之下,风云骤变,血流成河。他本想闲云野鹤悠闲度日,却陪她纵横商界叱诧风云,为她打下一片江山。剑未妥,江湖早,纵使不懂,也不默,少年啊,不归呀,吾辈皆是英雄! 鸟惊忽现白马,飘飘锦衣落梨花,少年呀,归来呀,千年谁复重生?一剑动京华!“沈昱辱我清白之身,还请沈家给我李家一个公道!” “身为沈家世子,犯下此等恶劣罪行,汝可知错?” “欲加之罪何患无辞!” “证据确凿,汝犯下此等滔天罪孽,还不认错,罪加一等!” “罚你禁足三年,将汝之罪行,昭告天下!” 一个二十一世纪的屌丝,刚完成一单新闻,猝死出租屋,还不知道有没有人收尸就来到了楚国,一个有着宋的憋屈明的铁血的平行空间还是异世界?总之不小心成了异性王唯一的子嗣,可能出场姿势不好,被人用锤子打出了的。周边都是贼兵蛮子鞑子,好在有后世的天线一条,不至于被古人玩死成为最惨穿越者,一路泡妞打蛮子,没事就种种地!当然是真的种地。
我真没想当富豪 轮回选择 大风漫漫 我不是大郎 重生:星辰剑帝 翼灵五行谱 最是寂寞逍遥仙 幕后:戏耍气运之子 天下第一帮 朽魂万骨枯 二狗人生 少女回魂 你最近好么 天赐万象玉作杯之兵哥哥 年少帝王梦 归去龙兮 重生:我天后老公的身份差点曝光了 不争之补天 明斯亚战歌 末世生存 : 新主 死格漫画邻居 将国之天鹰星哦漫画 all十五漫画 校园18x漫画 死格漫画邻居 原哲夫的武士漫画 偷窥之鬼父漫画全集在线观看 citrus 漫画百度云 原哲夫的武士漫画 同级生漫画老师的回忆 提高就业漫画图片 提高就业漫画图片 街霸bl漫画 17pic漫画 死格漫画邻居 邪教的日本漫画 将国之天鹰星哦漫画 all十五漫画 有王爷有肉的耽美漫画 死式虐杀曼威漫画 无邪气乐园漫画23 死式虐杀曼威漫画 有王爷有肉的耽美漫画 舔熟女屁眼漫画 猥琐血腥的漫画 bl 漫画 宝藏在相中 all十五漫画 有王爷有肉的耽美漫画 同级生漫画老师的回忆 all十五漫画 218邪恶漫画之斗罗大陆 无邪气乐园漫画23 暗黑的破坏神漫画 邪恶 死格漫画邻居 街霸bl漫画 邪教的日本漫画 暗黑的破坏神漫画 邪恶 将国之天鹰星漫画下载 街霸bl漫画 原哲夫的武士漫画 邪教的日本漫画 fate贞德漫画百度云 bl漫画《无忧劫》31 将国之天鹰星哦漫画 恐怖漫画《怨灵》怨灵 无邪气乐园漫画23 提高就业漫画图片 邪教的日本漫画 bl 漫画 宝藏在相中 巨乳女仆漫画全集 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 来自深渊的威胁 极光会的自我修养 全球高武:天赋放大一万倍 满朝佞臣,孤要做千古暴君 大巫教主 百度 百度 百度 百度 百度 死格漫画邻居 同级生漫画老师的回忆 218邪恶漫画之斗罗大陆 bl 漫画 宝藏在相中 校园18x漫画 王牌校草漫画 删除 3d漫画秘密情人1-2 死格漫画邻居 英雄的轨迹漫画 218邪恶漫画之斗罗大陆 死式虐杀曼威漫画 fate贞德漫画百度云 将国之天鹰星漫画下载 bl 漫画 宝藏在相中 暗黑的破坏神漫画 邪恶 巨乳女仆漫画全集 3d漫画秘密情人1-2 citrus 漫画百度云 bl 漫画 宝藏在相中 街霸bl漫画 王牌校草漫画 删除 王牌校草漫画 删除 bl漫画《无忧劫》31 3d漫画秘密情人1-2 英雄的轨迹漫画 街霸bl漫画 死格漫画邻居 原哲夫的武士漫画 恐怖漫画《怨灵》怨灵 提高就业漫画图片 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网