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
邪恶漫画奈奈久邪恶漫画鸣人纲手系列邪恶漫画奈奈子系列邪恶漫画嗯啊奥邪恶漫画女儿熟睡邪恶漫画奈奈久邪恶漫画妹妹结婚前一天邪恶漫画奈奈子系列邪恶漫画妹魔王的契约邪恶漫画妹妹邪恶漫画女生大全图片大全邪恶漫画奈奈子系列邪恶漫画妹妹的胸好软邪恶漫画女生大全图片大全邪恶漫画奈冢q弥邪恶漫画妹妹邪恶漫画妹妹上哥哥邪恶漫画女生大全图片邪恶漫画女生大全图片邪恶漫画目标是邪恶漫画媚?邪恶漫画女生大全图片邪恶漫画妹魔王的契约邪恶漫画母亲帮孩子受邪恶漫画农村3d邪恶漫画母爱的日常邪恶漫画农村3d邪恶漫画母亲帮孩子受邪恶漫画目标是邪恶漫画妹妹的胸好软那一天,我从梦中醒来发现自己躺在一个全然陌生的环境,破旧的家具,不知从何处散发的腐烂气味和白天无法打开的大门......这个地方处处散发着诡异的气息,令我没想到的是,到了晚上才是真正的噩梦,当黄昏降临,窗外竟挤满了血红的眼睛,白天坚硬如铁的大门悄然开了一条缝,透过缝隙隐约能看见外面似乎......站了个人?格洛斯特国在2100年创造出了第一批抗侵略的机甲武器,效果十分显著,不仅抵挡住了其他国家的侵略还收复了之前战败的边境地区,在这之后,其他国家也纷纷效仿格洛斯特国舍弃了对普通的枪械和炮弹的研究,也转向研究并创造出了机甲武器,世界爆发了机甲时代战争,战争依旧没有停息,格洛斯特国在2108年秘密打造出了约5m的由人类为载体的新型可作战机甲,但由于驾驶员的大脑活跃度和反应速度的年龄有着过高的要求,军方要求由25岁以下16岁以上的全部非贵族国民必须要参军,因此有大部分的高中生和大学生也必须参军,本是该好好享受青春的年纪却要被迫于战争和死亡为伍,本应握着笔的手却握着机甲操纵杆,战争是残酷且不公的,一群背负保卫国家使命的少年们啊,为了自己想守护的东西而苟延残喘的活下去吧!一个残疾人靠着幽默在现实直播中实现自身价值。 一个粉丝心中的无冕之王。 老婆多,是他的第一个标签。灵魂歌手,尿床是他的家常便饭。前半生默默无闻,受尽屈辱。 跳崖后意外获得一座金山。什么? 你让我老老实实当个普通人? 好,我答应你。什么豪车豪宅,长腿御姐,这不都是普通人的标配吗? 天命昭昭,余生瑶瑶 落云大陆是片修行大陆。 修行者们按照实力划分成了七个等级。 学徒、使者、执事、仙师、供奉、仙王、仙主。 等级越高,享有的资源分配越多、权力越大,高坐云端的仙主,拥有至高无上的权力-- 赵铭伦认为, 住对门的林洛伊是他的一生之敌; 从小到大,林洛伊没少告他的状,拆他的台,揭他的短! 直到生日这天, 赵铭伦居然获得了,能任意改变林洛伊身体的能力! 本以为这下子能彻底拿捏她, 万万没想到,林洛伊竟然……本人心血来潮,想写一部属于关于自己编著的世界。第一次写文,望读者们多多包涵生逢乱世,一个人人唾弃的乞丐,如今白发披肩,一袭血红长袍,手持森白骨剑,后背的长枪泛着令人望而生畏的红芒。惨白的月色下,纵身一跃便消失在了茫茫的夜色之中,留下的只有滔天的杀意。小说以多个单元故事呈现给读者,欢迎大家阅读。男子:兄台,我观你面色红润,许是患有大病啊 “大夫,您怎知晓,我这见到您身上那白花花的银两着实是心痒难耐啊。” “您不觉得这像极了我前些日头丢落的吗?” “兄台言之有理” 男子看着那脖间的刀,想了想命重要。
修仙剑传 异界开启的修仙路 王殿 我成了神国最后的希望 特战抗日军人 鉴诡手记 大唐憨婿 霸天魔神传 大王狗子 名剑英雄传 傲世天下之神州 我是坏蛋坏到底 行于天灾间,我能做什么 魔荡天涯 我在阳间当阴使 转生龙与精灵乱舞! 补仙道 心理医生的故事 签约被拒100次,硬刚到底 荡世九歌 邪恶漫画魔女保健 邪恶漫画女生毛 邪恶漫画妹妹上哥哥 邪恶漫画女儿熟睡 邪恶漫画魔女保健 邪恶漫画母娘乱园 邪恶漫画妹妹上哥哥 邪恶漫画妹妹的第一次 邪恶漫画母爱的日常 邪恶漫画妹妹的第一次有点紧 邪恶漫画妹妹睡着 邪恶漫画妹妹睡着 邪恶漫画母小狗 邪恶漫画女生毛 邪恶漫画奈奈久 邪恶漫画女儿熟睡 邪恶漫画妹妹是我的恋人全集下载 邪恶漫画母爱的日常 邪恶漫画名人与几天 邪恶漫画奈奈子系列 邪恶漫画女生毛 邪恶漫画奈奈子系列 邪恶漫画名人与几天 邪恶漫画女生大全图片 邪恶漫画妹妹 邪恶漫画母小狗 邪恶漫画魔女保健 邪恶漫画鸣人纲手系列 邪恶漫画名人与几天 邪恶漫画母爱的日常 邪恶漫画女儿熟睡 邪恶漫画女生大全图片大全集 邪恶漫画嗯啊奥 邪恶漫画奈奈久 邪恶漫画母亲帮孩子受 邪恶漫画农村3d 邪恶漫画嗯啊奥 邪恶漫画妹妹上哥哥 邪恶漫画母小狗 邪恶漫画奈冢q弥 邪恶漫画农村3d 邪恶漫画妹妹的第一次 邪恶漫画奶牛长 邪恶漫画妹妹是我的恋人全集下载 邪恶漫画女生大全图片大全 邪恶漫画女生大全图片大全集 邪恶漫画妹妹睡着 邪恶漫画农村3d 邪恶漫画母小狗 邪恶漫画妹妹妈妈 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 穿越遇见半神猎魔人 废土枭雄 万妖归位 鹏破九天 逍遥小太监 快连下载 亚星管理平台 亚星官网 快连下载 亚星管理平台 邪恶漫画奶牛长 邪恶漫画妹妹是我的恋人全集下载 邪恶漫画媚? 邪恶漫画目标是 邪恶漫画名人与几天 邪恶漫画妹妹睡着 邪恶漫画魔女保健 邪恶漫画妹妹 邪恶漫画农村3d 邪恶漫画妹妹的第一次 邪恶漫画母娘乱园 邪恶漫画鸣人纲手系列 邪恶漫画母亲帮孩子受 邪恶漫画农村3d 邪恶漫画目标是 邪恶漫画母亲帮孩子受 邪恶漫画妹妹是我的恋人全集下载 邪恶漫画母小狗 邪恶漫画奈奈子系列 邪恶漫画女生大全图片大全集 邪恶漫画奈奈子系列 邪恶漫画目标是 邪恶漫画嗯啊奥 邪恶漫画媚? 邪恶漫画魔女保健 邪恶漫画名人与几天 邪恶漫画女生大全图片 邪恶漫画奈冢q弥 邪恶漫画女生大全图片 邪恶漫画妹妹妈妈