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
水瓶座男的头像男生六人动漫头像头像 杨姓氏什么动漫黑色qq头像帅适合混黑的头像水瓶座男的头像微信头像图片动态大全头像 杨姓氏男生可爱动态头像可爱图片大全可爱图片宠物狗萌头像花小动物头像头像 杨姓氏公主头像图片女生花小动物头像qq头像卡通情侣头像带字图片宠物狗萌头像有文字的qq头像男女生头像红色吓人适合混黑的头像蓝色头发二次元女生头像qq头像女生电脑壁纸图片女生头像红色吓人男生可爱动态头像可爱图片大全可爱图片孤独悲伤的男生头像粉色少女头像辫子qq卡通头像多张粉色少女头像辫子孤独悲伤的男生头像蓝色头发二次元女生头像公主头像图片女生元极,是元磁极光的缩写。 凡事预则立,不预则废,少年刘海因遇事多思,被怒熊道人收为徒弟,从此走上炼气修道之路……一个充满神奇色彩的世界,在这里,一切都是未知的,但是,一切都是被记录的的。天是什么,是一部法典,一部恐怖的法典,不过,法典是什么呢?哦!法典就是用来查阅的,管我,凭什么,法典就是法典还是乖乖的做好你的本职吧!本应平凡,却阴差阳错,这一天,天逆了,人变了,他还是他吗......星辰变,乱世起,意外的流星,意外的出生,血腥、挫折,还有家散,成就了他的不凡,他是谁?到底是谁呢?弥漫在空气中的各种元素微粒,他们在运用着自己的力量在使用它们,聚合、变质、融合等等,各种各样的变化,这是元素与灵魂相存的世界,灵魂运元素,元素依灵魂。天地正气在,英雄傲世来。一刀尽江河,一手握日月,共人间悲欢,历九世劫波。缘来行到水穷处,缘尽坐看云起时。世间毁誉,世人冷眼,能奈我何?道行乾坤,德载天下!萧瑟秋风,斗转星易,换了人间! 试看萧易觉醒蜕变,傲世苍穹,笑看风云!当捣蛋鬼横行漫威世界,初灯照耀创世的曙光,当盲目与痴愚之神的混沌包裹整个漫威世界之时,哪些曾经的超级英雄是否还能像电影里一样拯救世界?这是一个有关来自异界的旅客在漫威搞事情的故事他喝了一大口酒,眼睛看着那些画板,有的是女孩坐在草地上,有的是女孩坐吃苹果,有的是女孩做鬼脸,有的是女孩钻在桌子底下,有的是女孩在海边沙滩上走,有的是女孩在看书,有的是女孩在堆石头,有的是女孩在吹肥皂泡,有的是女孩在海边堆沙堡。 到处都是同一个女孩的头像,到处都是他无处不在的思念,和他曾经毫不吝啬的青春。她用眼睛一张一张的端详起这些画作,每一幅画作虽然很唯美,却都散发出悲伤的气息,仿佛充满了痛苦而挣扎的记忆,她轻轻地问,你为什么你不去找她? 他的眼睛里闪过一丝痛楚,我的世界在这里,离开了我的画室我就不再是我自己了。 她问,既然你这么想念她,难道不能将你的画室带到有她在的地方吗? 他的表情显得忧伤而决绝,我必须远离喧嚣,有如一座寂静的庙宇,我需要用有限的生命去创造永恒。 他问,你呢,为什么来到这里,为什么那么伤心。 她本来不是一个喜欢说话的人,也不喜欢轻易坦露自己的心事。但是这次她说,我总是这样。 这是神魔意志与人类精神的碰撞,这是斗气与魔法充斥的世界,在牧师的祈祷与召唤师的吟唱中,天才少年龙行云带领渺小的人类,决战诸天神魔。他是骑士?他是魔法师?他是学霸?他是冒险者?他是英勇的领主?他是伟大的统帅?他是无敌的战神?不他是人类的英雄。末世,古武,异能,机甲,格斗,热血。 公元2138年。人类科技获得了长足的进步。 为了延长寿命,科学家们进行了一项秘密研究。导致一种名为猩红素的病毒扩散全球。 自此之后。 红雾降临,人类的欲望失去了道德的束缚…… 饥饿,权力,贪婪,色欲……人类将永坠的黑暗之中。 而少年白泽也再也没有见过自己的养母白月魁。 且看他如何带着妹妹,一步一步的在末日中艰难求存,并最终找出末日真相。 傻小子进城了双日凌空,神秘再现,在科技崩溃的废墟中,万物迎来了无限进化! 穿越而来的沈凌,激活了自己的无限世界模拟器。 只要是花费足够的能量,就能够获得在模拟世界中得到的修为、武功和物品! 于是,在小李飞刀的世界中,沈凌获得了小李飞刀! 在大唐双龙的世界中,沈凌修成了剑心通明! 在蜀山的世界中,沈凌拿到了化血神刀! 在洪荒的世界中,他夺取了诛仙四剑……记录着关于斯卡德科技世界观及背景,其他的小说可以使用里面的任何设定,任何人都可以使用(需要提前标注),会不定期更新。
星宇辰主 那小子竟然是洪门大佬 营救公主吧 红尘诉求 五彩凤尾 大宋祖王爷 都市绝门医神 鸿天女帝 御灵逆天之旅 娱乐:从反派开始的影帝之路 曾以为天永恒不灭 玄幻:我,修改万物,万古独尊! 我在修仙界混日子 完美吞噬之魔道封神 隋唐生活启示录 穿越秦朝之始皇是我兄弟 过客的梦 无尽序列 重生剑圣传 神澜 qq情侣做爱头像情侣专用 呆呆的卡通女生头像 有文字的qq头像男 适合混黑的头像 qq情侣做爱头像情侣专用 六人闺蜜头像吧 有文字的qq头像男 澳洲大海图片头像 qq卡通头像多张 qq头像女小清新长发发型 帅气情侣头像男 帅气情侣头像男 火骷颅头头像 呆呆的卡通女生头像 水瓶座男的头像 适合混黑的头像 qq头像动态明星 qq卡通头像多张 动漫闺蜜头像6人背影 头像 杨姓氏 呆呆的卡通女生头像 头像 杨姓氏 动漫闺蜜头像6人背影 女生头像红色吓人 宠物狗萌头像 火骷颅头头像 qq情侣做爱头像情侣专用 男生六人动漫头像 动漫闺蜜头像6人背影 qq卡通头像多张 适合混黑的头像 露胸头像女 什么动漫黑色qq头像帅 水瓶座男的头像 孤独悲伤的男生头像 粉色少女头像辫子 什么动漫黑色qq头像帅 有文字的qq头像男 火骷颅头头像 qq头像卡通情侣头像带字图片 粉色少女头像辫子 澳洲大海图片头像 美国毕业女生头像 qq头像动态明星 花小动物头像 露胸头像女 帅气情侣头像男 粉色少女头像辫子 火骷颅头头像 九个男闺蜜头像 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 我不想当贼头 混沌之都 操刀者 中州生死诀 末日骰子 AG真人 欧博官网 亚星游戏官网 AG真人 百家乐官网 粉色少女头像辫子 呆呆的卡通女生头像 qq头像女生电脑壁纸图片 孤独悲伤的男生头像 九个男闺蜜头像 男生六人动漫头像 qq头像女小清新长发发型 蓝色头发二次元女生头像 男生可爱动态头像可爱图片大全可爱图片 适合混黑的头像 适合混黑的头像 美国毕业女生头像 水瓶座男的头像 孤独悲伤的男生头像 火骷颅头头像 qq情侣做爱头像情侣专用 什么动漫黑色qq头像帅 露胸头像女 男生可爱动态头像可爱图片大全可爱图片 六人闺蜜头像吧 花小动物头像 动漫闺蜜头像6人背影 qq头像女小清新长发发型 火骷颅头头像 帅气情侣头像男 粉色少女头像辫子 粉色少女头像辫子 动漫闺蜜头像6人背影 动漫闺蜜头像6人背影 qq头像动态明星