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
国庆节期间湖南天气河南洛阳8月下旬天气预报查询国庆节期间湖南天气略阳历史天气预报略阳县十月天气开封万仙山天气预报武刚天气预报河北一年天气海丰天气台风登录在哪里桐乡市大麻镇天气随天气国庆节期间湖南天气昭苏县2016年3月天气预报十月份天气岳阳2017河北一年天气桐乡市大麻镇天气贵州贵阳前五日天气情况十月份天气岳阳十月份天气岳阳贵州榕江天气6月份河南l老君山天气预报一周十月份天气岳阳海丰天气台风登录在哪里贵阳一周的天气情况略阳县十月天气l洛阳天气预报10天略阳历史天气预报贵阳一周的天气情况贵州榕江天气6月份昭苏县2016年3月天气预报当低魔时代遭遇天灾人祸,当混沌神选开始觊觎这个世界,当旧日支配者降临世间,当泰伦虫族迷路至此,当遭受欲望的驱使互相征伐内斗,人类究竟可以坚持多久? 在末世的大框架下,人性的黑暗面暴露无遗,但勇气的赞歌也可以响彻云霄。 一双眼睛,看不清世态炎凉。 一壶浊酒,饮不尽爱恨情仇。 一张笨嘴,道不完沧海桑田。 一曲高歌,唱不清岁月蹉跎。 一段故事,只不过黄粱一梦。 本书所有主人公只是随着事件的推动而依自己的性格进行。他们只是这段历史的见证者,经历者 ,仅此而已。 万物轮回始于本末,功过是非,皆留各位看官评说。 本作不回会去影射现实生活,如有巧合实属雷同。 毕竟历史总是惊人的相似,我们只是历史的见证者。靖元二年,北荒军攻破大梁都城,俘虏皇帝无嫔妃无数,城中烽火狼烟,屠戮成灾,这座屹立千载的中原王朝正在蒙受巨大的耻辱!绝望之际,一身着白袍的将军忽然杀出,身后无数白袍军如同幽灵,收割着北荒军的生命!北荒军大败,退兵百里,大梁王朝免去了灭国之危! 战后,人人都在寻找这位大梁的英雄,皇上更是下旨封其为有史以来第一位异姓王,为他建立寺庙,享大梁子民世代敬仰,可这位白袍将军却如同烟云一般,销声匿迹了。 与此同时,上京城赵家多了一位身受重伤的少爷……原籍山东诸城男主顾易意外穿越到大楚帝国,结果身份和现代社会还是一样平民,在大楚帝国一次意外中获得了系统辅助,完成任务直接一路飙升,咸鱼翻身为一大楚帝王。普通青年顾天南,因为一次空难得到上古传承,得知一个惊天大秘密。 人类的浩劫即将来临?一颗飞星带来的地球灾难。 山医命相卜,金木水火土,五块玉佩代表五种技能,拥有五种技能的顾天南打跑外星人,封印太阳系,拯救地球。。。 原本是各个不同世界和地方的九位勇士,却因一次的使命而是他们走到了一起;今后的路,虽然漫长而艰巨,但他们之间的友谊与羁绊却不会因为任何原因而被斩断,不论在何方,都会把彼此深深地记在心里!!符文本应该是自然的烙印,却成为掌控者专属的能力,且看尤白礼在这个异界大陆如何挣扎成长。意外穿越异世,别人成仙成佛,惨点的也是废物逆袭。 可是到了古二蛋这里,他却发现自己一点盼头也没有。 因为这家伙成为了一个骷髅兵!还是一个没有脑袋的下等残躯战损版骷髅兵! 生活不易,骷髅叹气,望着自己一两肉都没有的身体,古二蛋决定要逆袭给所有人看! “金手指系统!我要称王称霸!给我发威!” “收到宿主期盼,本系统已按照期盼进行修改,正式进化为骷髅领主系统,你可以通过收集资源来强化麾下士兵啦!而且是没有上限的强化呦!” “哦?这么厉害的吗!那么这种能力也能作用到我的身上对吧!” “…………” “对吧?” “…………” “对吧?!!!”36岁的江左,把生活过得一团糟,正当他在懊悔时,突然回到了20年前,他重生了!由此他开启了他的开挂人生!一个驻外星小士兵,偶得可以进化的智慧程序,跨入宇宙,逐渐接触到高等级文明,打造高端武器与战舰,血战星海,播撒炎黄民族神威。 本书为纯粹的科幻,预计四百万字,没有狗血剧情,没有打脸公式,仅有不断攀升的战斗智慧与铁血勇气。
法之起灵 柴周 仙人庵 何以为家! 治愈系梦境 霓裳剑劫 最强的我只想过平凡人生 玄门圣医 我当侦探的日子 我就是送外卖的 诸天心劫 午夜诡梦 地球的第六次重启 熊的孩子 玄幻:我的女帝徒弟要黑化 废柴皇子的末世生存指南 重生:我是一只科技狼 风流毒公子 匆匆17年 这主播能处,开局怒怼黑心商家 怀化市10天气预报 桐乡市大麻天气 贵州贵阳前五日天气情况 十月份天气岳阳 怀化市10天气预报 本周五洛阳天气如何 贵州贵阳前五日天气预报 岳阳10天至15天天气 l洛阳天气预报10天 昭苏县2016年3月天气预报 海丰天气台风登录在哪里 郭亮村万仙山景区天气预报 修文扎佐天气 桐乡市大麻镇天气 开封万仙山天气预报 略阳县十月天气 贵州贵阳前五日天气预报 l洛阳天气预报10天 河南l老君山天气预报一周 国庆节期间湖南天气 桐乡市大麻天气 河北一年天气 河南洛阳8月下旬天气预报查询 十月份天气岳阳2017 桐乡市大麻镇天气 修文扎佐天气 l洛阳天气预报10天 河南洛阳8月下旬天气预报查询 河南l老君山天气预报一周 l洛阳天气预报10天 略阳县十月天气 桐乡市大麻天气 国庆期间略阳天气预报 国庆节期间湖南天气 贵阳一周的天气情况 略阳县十月天气 国庆期间略阳天气预报 贵州贵阳前五日天气情况 修文扎佐天气 河北一年天气 略阳历史天气预报 岳阳2017国庆天气预报 贵州省榕江江天气预报 郭亮村万仙山景区天气预报 十月份天气岳阳2017 桐乡市大麻天气 郭亮村万仙山景区天气预报 略阳历史天气预报 贵州榕江天气6月份 武刚天气预报 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 高端洪荒开局上交随身系统 全民制作大师横空出世 刀光剑影何处问 江南名片,片片有名 爸妈,我是你们亲生的吗? 皇冠登3出租 澳门葡京游戏官网 澳门葡京官网 皇冠登3出租 亚星官网 贵州贵阳前五日天气情况 郭亮村万仙山景区天气预报 贵州贵阳前五日天气预报 桐乡市大麻天气 贵州榕江天气6月份 岳阳2017国庆天气预报 河北井陉万仙山天气 河南洛阳8月下旬天气预报查询 河北井陉万仙山天气 略阳历史天气预报 河南l老君山天气预报一周 本周五洛阳天气如何 河北一年天气 贵州贵阳前五日天气预报 武刚天气预报 修文扎佐天气 十月份天气岳阳 桐乡市大麻天气 随天气 开封万仙山天气预报 郭亮村万仙山景区天气预报 河南洛阳8月下旬天气预报查询 桐乡市大麻天气 河北一年天气 开封万仙山天气预报 浙江省乐清市天气40天 河北一年天气 略阳县十月天气 岳阳2017国庆天气预报 略阳县十月天气