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
头文字m漫画图片弥美sm漫画男男图片 迅雷下载我与秘书漫画无翼鸟漫画在线观看杀戮追踪漫画第八话头文字m漫画图片弥美秋山?涡岸裆倥?漫画我与秘书漫画青春迷航漫画第二季表达心愿的四格漫画钻石王牌漫画396我与秘书漫画植物触手怪漫画钻石王牌漫画396我与秘书漫画表达心愿的四格漫画铁拳漫威漫画斗罗大陆漫画(爱优漫)杀戮追踪漫画第八话搞到怀孕了的漫画邪恶漫画监狱.斗罗大陆漫画(爱优漫)青春迷航漫画第二季邪恶漫画之肥大 扩张乳汁漫画罪母丝袜同人漫画乳汁漫画罪母鹭淮漫画番外搞到怀孕了的漫画我的三个妻子漫画晋恵公是一个器量狭窄、贪利忘义的国君。他秦穆公的帮助,回国即位。却赖掉了答应酬谢秦国的五座城池。 晋国闹灾荒,秦国运来粮食救济他们。第二年秦国遇到荒年,派人去晋国购买粮食。惠公不但不答应,反乘机出兵攻打秦国。 惠公的这种行为,把秦国上上下下都激怒了。两军在韩原地方的龙门山大战了一场。秦穆公在危急时,得到人民的援助,转败为胜,打败了晋军,并俘虏了惠公。 穆公宽宏大量,释放了恵公,惠公并没有吸取教训,回国后,却杀害了劝谏他的将军庆郑,越发失却了人心。寻仙之路,漫漫无穷,那一缕剑气贯穿了天上地下,可叹! 才明了,凡仙之别,已成断路!斗界的假面骑士强袭,storm要斗破苍穹,这是一个魔法和斗气的疯狂世界啊。肖诺这个假面骑士强袭有个凶猛系统啊。 这真不是假面骑士,而是一个披着假面骑士storm皮肤的家伙在斗界里疯狂的强袭饶命。斗界世界,宇宙大地,恶魔果实,应有尽有 叶凡,一个普通的上班族,偶然穿越到大雍修仙世界,成为师门里唯一的男人。 原本天上人间的生活却因系统的奖励让叶凡十分头疼。 “十世元阳之体?!” “童子功?!” “系统,你特喵玩我呢!” 【叮,宿主顶住了四师姐诱惑,道心稳固,童子功等级上升。修为上升!】 【叮,宿主顶住了宗主的诱惑,道心稳固,童子功等级大幅度上升,修为大幅度上升!】 …… 四师姐绿蔓儿:“小师弟求求你了,跟师姐双修吧!” 宗主冷清玄:“乖徒儿,你与为师双修才可振兴宗门,请你务必做出亿点牺牲!” 叶凡:“呔,妖精,休想乱我道心!” 身为挂逼,叶凡身在花丛中,片叶不沾身,一路带领师门成为世上最强! 长临渊黑暗中总有一双眼睛盯着你 阴谋算计?在绝对的实力面前全是狗屁! 修炼瓶颈?在无敌天资面前就是笑话。   何为魂修?修魂逆命,与天争。 ...... “你可想好?八目玉属性丶能力各不相同。若是选择震玉,那么日后也不可再更改。” “前辈,我想好了。” ...... 天元大陆,姜芜忧历经种种磨难,带着八目玉之一震玉,踏上了修炼旅途。在这充斥着东西方玄幻色彩丶妖兽横行的世界中,卷入一场场阴谋和争斗。自此,再无宁日。 ...... 一入魂修深似谷,再回眸时已无路。前世,寂灭剑神陈夜一人对抗着吞天魔龙,他看着大陆被摧毁,他悲伤无比,他怒吼道:“寂灭归元,同归于尽吧!老怪物!”说罢,他燃尽生命发出宇宙中最强一剑,这时,一颗石头发出了强烈的光芒,将陈夜轮回道3000年前。他一路提升实力,能否打败吞天魔龙?我叫林温,是一名末日生存爱好者,这些年来,一切我能想到的物资我都储备了。 或许别人家里摆着一墙壁的AJ或者手办,而我一整面墙壁,储存了数十斤压缩饼干,上百个罐头,医疗用品、防毒面具以及防化服,甚至还有自制手弩。 我常常幻想着末日降临丧尸围城,那堆满物资的储物间,就会是我最安心的庇护所。 而让我意外的是,当末日真的降临时,一切与我的幻想截然不同。没有血腥残暴的丧尸,没有异想天开的外星人入侵。 那日,璀璨的光团从苍穹降临,它宛如神祇,没有人可以直视。 ……灵魂,存在于宗教思想中,它指人类超自然及非物质的组成部分。但若是Host(宿主)临终前仍心存怨念,其Soul将不死不灭于世间,直到找到新的Host,成为Regulator(监管者)。往往Soul成为Soul的事情是很罕见的,所以Regulator更是屈指可数。雪夜,Dark Knight的Soul意外寄宿到了天野雨果的身上。Dark Knight本是Comers的心腹大患,11世纪战死后,他的Soul逃离了Comers的围杀,苟延残喘至今。Comers被迫赋予Soul,创造出更多的Regulator前往世间猎杀Dark Knight以及他的Host。当Dark降临于宿命的Knight身上,灵魂的潮汐将席卷世间。三年前,他被迫前往北境当兵。三年后,他在战场封神,四海皆震。有一天,他得知自己还有一个女儿,随时会有危险,他不顾一切从战场归来,他是铁血战神, 他所到之处,必定又是一场腥风血雨。
两界杂货铺 全球映射:我靠捡尸成大佬 大国实业 穿越五千年的古医术 暗黑心理测量者:锁罪 盗迷之八子连珠 众神之墓之征天纪 星辰侠客 神武古帝 无敌届主 那年那天那个你和我 玄能通天 仙魔惊鸿客 轩辕招魂 H05:最后的防线 自由骑士金伟福 大唐:我在长安开酒楼 仙人不长生 逆命人守则:斩神! 丝袜同人漫画 校园漫画图片高清 同人邪恶漫画大全 杀戮追踪漫画第八话 sm漫画男男图片 迅雷下载 鹭淮漫画番外 同人邪恶漫画大全 七龙珠碧儿邪恶漫画 所有公主和七公主的漫画 植物触手怪漫画 扑狐妖小红娘漫画全集 扑狐妖小红娘漫画全集 邪恶漫画之肥大 扩张 校园漫画图片高清 头文字m漫画图片弥美 杀戮追踪漫画第八话 偷蛋的爸爸 漫画 丝袜同人漫画 Q第侦探因幡漫画 我与秘书漫画 校园漫画图片高清 我与秘书漫画 Q第侦探因幡漫画 斗罗大陆漫画(爱优漫) 表达心愿的四格漫画 邪恶漫画之人妻侵犯本子 丝袜同人漫画 Q第侦探因幡漫画 Q第侦探因幡漫画 所有公主和七公主的漫画 杀戮追踪漫画第八话 worst极恶王2漫画 无翼鸟漫画在线观看 头文字m漫画图片弥美 邪恶漫画之肥大 扩张 乳汁漫画罪母 无翼鸟漫画在线观看 同人邪恶漫画大全 邪恶漫画之肥大 扩张 开心超人四格漫画图片大全 乳汁漫画罪母 七龙珠碧儿邪恶漫画 搞到怀孕了的漫画 偷蛋的爸爸 漫画 钻石王牌漫画396 worst极恶王2漫画 扑狐妖小红娘漫画全集 乳汁漫画罪母 邪恶漫画之人妻侵犯本子 铁拳漫威漫画 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 长夜一盏灯 越光明越黑暗 异世界之探寻真相 我在阳间做收魂人 凡人轶事录 亚星管理平台 万利游戏官网 万利官网 亚星管理平台 澳门葡京官网 无翼鸟漫画在线观看 我与秘书漫画 铁拳漫威漫画 无翼鸟漫画在线观看 斗罗大陆漫画(爱优漫) 我的三个妻子漫画 斗罗大陆漫画(爱优漫) 邪恶漫画之肥大 扩张 worst极恶王2漫画 鹭淮漫画番外 邪恶漫画监狱. 邪恶漫画之人妻侵犯本子 七龙珠碧儿邪恶漫画 搞笑日常生活漫画 七龙珠碧儿邪恶漫画 邪恶漫画监狱. 我的三个妻子漫画 七龙珠碧儿邪恶漫画 鹭淮漫画番外 我的三个妻子漫画 同人邪恶漫画大全 所有公主和七公主的漫画 偷蛋的爸爸 漫画 秋山?涡岸裆倥?漫画 青春迷航漫画第二季 斗罗大陆漫画(爱优漫) 头文字m漫画图片弥美 钻石王牌漫画396 Q第侦探因幡漫画 扑狐妖小红娘漫画全集