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男头像兄弟带字条狗狗与人对视头像可爱精选头像king字母头像 文字头像带风景男微信头像图片大全 励志qq男头像兄弟带字条二次元下半身女生头像微信头像图片大全 励志可爱精选头像头像带风景男霸气社会腿头像图片大全2016最新欧美女生头像2016最新欧美女生头像情侣头像动漫可爱猫和老鼠青春点的头像职业头像照片男白色系女生头像可爱漫画头像黑西装男头像动漫头像女同天秤座美丽头像六年级二班青春有不散头像蜘蛛侠小虫头像情侣头像动漫可爱猫和老鼠二次元下半身女生头像金戈铁马,驰骋沙场,断剑送人归,若有一天我立在苍穹之上,一定要主宰自己的命运逃到地球的陆源被人追杀,他不想就这么陨落,他要稳健,要苟住发育。 但是……他那便宜老婆家事有点多。 有人死的时候,把他们一家都托付给了陆源,他不喜欢麻烦,决定横推过去。张天通:异人很稀有吗? 路人甲:没错,一亿多的幸存者生存的米谢扎尔堡垒,却这有一千多的异人。 张天通:差不多十万比一的几率,果然很稀有。 那异人很强大咯! 路人乙:的确,异人的强大是常人一生都看不到的巅峰。 张天通:所以,异人天生就有荣耀、特权,普通人惹了异人就算死也是活该咯。 此话一出全场沉默,虽然只是事实,但却没有明确的规定,只能算是大家都认同。 路人丙:张天通别忘了,你也是一名异人。 闻言的张天通,一脸不屑。 张天通:我何德何能称为荣耀和特权加身的异人。 待他清了清嗓门,用全场的异人都能听到他的的声音,咆哮道:我是异人之上。 一个经营着普通酒馆酒吧的吸血鬼伯爵,在朋友的影响下,知道了城市、村庄、等,更多异类的消息,知道了世间不止吸血鬼,不止与自己敌对的狼人,经还有那么多妖、人、鬼、怪,了解了更多的更多关于身世的消息,了解身世,获得秘宝,弱水三千,最终只取一瓢。非典型的轻玄幻武侠载体。素不相识的两人,共同走入面对血狱幽冥傀儡的故事中,历经九洲大地,看遍风起云涌,知天下疾苦,晓人间冷暖,从出西秦始,至返蜀中止,在神州大地划了个大圈,圈尽世间百态。真红之血的互相共融,相识,相助,相知,相爱,志向共同的江湖儿女,同行,同心,同德,同力,共同营造出了一个激荡写意的家国江湖。这是一个讲述主角与各种存在于神话传说之中的鬼怪厮杀的故事。 这个世界存在着许多常人无法认知的禁忌,而禁忌其本身的存在便不允许他人接触,否则这些禁忌也终将撕开现世的帘幕,为世界带来灾难与痛苦,而除灵部队,是这样一支专门用于对抗禁忌的武装部队,他们会用尽一切办法,阻止这些禁忌染指这个世界。 而徐凌云便是被这份禁忌所波及的普通人之一,五年前,徐凌云最重要的青梅竹马因为卷入了一起没有记录的事件中而彻底变得杳无音讯。 而现在,五年之后,自己也被卷入了一次相似的事件之中,从此徐凌云便被迫进入了这个本不应踏足的领域之中。 “在得知真相之前,我会用尽一切办法在这个恐怖的世界里活下去!” 筑灵基,破灵笼,一步一点上天宫,   忆往生,修前程,彼岸尽头照三身。   仙台拂净红尘路,退隐闭居为仙人,   世人皆求长生种,仙路尽头皆为空。这是似忽是一个中世纪世界,但又有像九夏,阿拉汉,瀛洲这样的东方国家。 这个世界有淳朴的人类,有高洁的精灵,有可爱的兽人,有邪恶的魔族......至少林武刚穿越到这里时是这么认为的。 他是以一个人类的身份来到这个世界的,在他生活的人类国家里,有美丽的贵族小姐,善解人意的修女,英俊的骑士,开明的领主。你可以在城里的公会里注册成为一个冒险者,成为一个传说;又或是拜入领主麾下,成为一名骑士,征战四方;还是成为商人,富甲一方。 但林武看到衣着华丽的贵族,衣衫褴褛的农奴;金碧辉煌的宫殿,充满恶臭的贫民窟;摆满桌子的山珍海味,发霉的面包,林武觉得这第二次生命,应为这世界上最美好的事情奋斗,他将带领这些绝望的人换一个活法,一个更有意义的活法。 新人报道,请多指教。我有毒,别碰我!我眼瞎,别逼我睁眼!我之毒,无人可解,我之眼,可判生死阴阳!
带着各种修改器穿越 丧尸国度:生存之道 魔书莫邪 灵境圣者 对话日常 心罪笔录 重生之逆岁月 林深不见鲸落 帝国时空之修订版 武道之路漫漫 十方:是你们逼我称帝的! 全民皆战:只有我疯狂送礼 武神法相 风语有经年 剑自雪中来 鸿蒙至尊重生成系统 大魏青衣 离开了幽村,没人和我说话 猎神之帝 人在娘胎:隔壁女帝想踹我出去 头像 黑魂 男生黑白非主流头像 可爱精选头像 十二星座女孩头像 头像 黑魂 2017好看的姐妹头像4的 男女同用头像欧美 黑西装男头像动漫 头像带风景男 情侣头像动漫可爱猫和老鼠 头像女同 头像女同 二次元下半身女生头像 蜘蛛侠小虫头像 霸气社会腿头像图片大全 青春点的头像 男女同用头像欧美 头像带风景男 职业头像照片男 2017漫画头像男生 男生黑白非主流头像 关于冬天头像 微信头像图片大全 励志 十二星座头像女生大图 2017好看的姐妹头像4的 黑西装男头像动漫 天秤座美丽头像 十二星座女孩头像 青春点的头像 天秤座美丽头像 2016最新欧美女生头像 头像 黑魂 六年级二班青春有不散头像 qq男头像兄弟带字条 黑西装男头像动漫 头像女同 男女同用头像欧美 2017漫画头像男生 黑西装男头像动漫 男女同用头像欧美 头像女同 十二星座头像人物图片 情侣头像动漫可爱猫和老鼠 关于冬天头像 微信头像图片大全 励志 头像 黑魂 白色系女生头像可爱漫画头像 头像女同 黑白文字伤感头像大全2015最新 狗狗与人对视头像 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 守护者与猫头鹰 赵国那些事儿 神降谕旨 两界开端 天下第一公子 欧博官网 亚星管理平台 澳门葡京游戏官网 欧博官网 亚星游戏官网 中年和尚动漫头像 青春点的头像 职业头像照片男 职业头像照片男 天秤座美丽头像 男生黑白非主流头像 king字母头像 文字 中年和尚动漫头像 蜘蛛侠小虫头像 2016最新欧美女生头像 2017好看的姐妹头像4的 十二星座女孩头像 黑白文字伤感头像大全2015最新 头像 黑魂 天秤座美丽头像 一个卡通里男生头像 青春点的头像 青春点的头像 职业头像照片男 2016最新欧美女生头像 十二星座头像女生大图 天秤座美丽头像 白色系女生头像可爱漫画头像 青春点的头像 男生黑白非主流头像 黑西装男头像动漫 可爱精选头像 二次元下半身女生头像 男女同用头像欧美 十二星座头像女生大图