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 in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically.

<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

p>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="span6">
        Level 1 column
        <div class="row">
            <div class="span3">Level 2</div>
            <div class="span3">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>

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>

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: 767px) { ... }
  /* Portrait tablet to landscape and desktop */
  @media (min-width: 768px) and (max-width: 979px) { ... }
  /* 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 hiding 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
金华湖溪公交车站电话大理神州租车的电话号码吉林市电力宾馆电话高唐到北京大客电话乐平萨米特瓷砖电话金华湖溪公交车站电话兴城板车联系电话吉林市电力宾馆电话昆明省工疗养院电话香港接电话多少钱杭州庆春新华书店电话金华湖溪公交车站电话随州华莱士电话杭州庆春新华书店电话吉林市电力宾馆电话葫芦岛森林中介电话自由港量贩式ktv电话乐平萨米特瓷砖电话乐平萨米特瓷砖电话兰州火吧9号电话郑州一厂麻辣猪蹄电话外地车进京电话咨询昆明省工疗养院电话天马汇农家小院电话东莞到义乌客车电话孝义到离石司机电话高唐到北京大客电话工农兵电话宜昌兰州火吧9号电话咸阳南站汽车电话号码有的人穷困潦倒,有的人纸醉金迷,万般皆是命,半点不由人。 给你一个机会,让你重新选择你的人生,在这里,你可以获得财富、地位、美女、跑车,一切按照你的设定来重新选择!走进这本书,感受万千人生下的千滋百味! 农村小伙秦天继承太乙神针,身怀失传古医术,被誉为一代天医, 从此他时来运转,纵横天下。  “神医,首富已经在门外等了你几个小时了,什么时候给他看病?”   秦天躺靠美人怀,摆摆手说道:“让他等着……”监狱禁闭室中有句话人尽皆知,有朝一日龙抬头,定让黄河水倒流,有朝一日虎归山,定让血染半边天。 &amp;quot;北冥有鱼,其名为鲲。鲲之大,不知几千里也。化而为鸟,其名为鹏。鹏之背,不知几千里也......&amp;quot; “:有一天我一定要像鲲鹏一样翱翔于天地之间,畅游于四海之内,载物助人”辰羽激动地说道。 可直到意外到来,鲲鹏之语告诉他修仙的真谛...... 太玄大陆,五位最强者,被称为神。某天,一场大战过后,大陆中最年轻的神失踪,恰逢一座小城池,一位少女问旁边的少年说:“你将来想做什么呀?”少年冷漠的回答:招兵买马、踏破龙阳。本作品纯属本人刘嘉述琐碎生活中的一部分,书中提到的人物名称均为亲朋好友的外号及化名,选择性塑造出各个阶层为了生活奔波劳累的奋斗史!书中人物形象刻画均与现实人物相辅相成!还原度98%!多谢大家捧场阅读!上古年间,随着创世五神陨落,大地陷入混乱当中,无数强者相序崛起,争夺着五神遗留的,那为数不多成神的机缘。 经过万年的厮杀,无数的神明相序出现,局面也渐渐的到控制,大地看似再一次恢复宁静,实则暗流涌动。 在这期间一个人的出现,让这不安的局面再一次爆发。 古小溪一个古怪神秘的人。 他拥有令神都嫉妒的恐怖灵魂,却也为此差点殒命。 他无心争夺神位,却凭一己之力挑战神明。 这一切只为心中的执念,那个他出现的唯一目的,刹瓦娜之魂。 神明布下游戏,每个人都可以参与并拥有变身铠甲的能力,不同的召唤器散落世界,获得它的人会变得如何呢?一段坎坷的爱情故事。感激孙淑娟老师与水木布衣一路的支持和鼓励孙浩立志于实现其明星的梦想,并一直努力着
修仙:家族崛起 魔亦通天 御剑芒 无敌的我只能当个辅助 修行心依旧 晴姐,等我的江山如画 蛆先生的一生 异世之开局捡到一头龙 我的终末 东京热战纪 穿越梦境桃花源 仙不可测 熵定录 魔主在校园 契魂堕魔永霸域 诡丧之城 大道帝辛 一眼万年ONE 四合院:满院禽兽都死远点,滚 浮生鬼道 孝义到离石司机电话 葫芦岛森林中介电话 自由港量贩式ktv电话 乐平萨米特瓷砖电话 大理神州租车的电话号码 工农兵电话宜昌 青海西宁南山公园电话号码 甲子汽车站电话 恒山一部饭店电话 随州华莱士电话 沙头吉旅酒店电话 沙头吉旅酒店电话 天马汇农家小院电话 葫芦岛森林中介电话 金华湖溪公交车站电话 东莞到义乌客车电话 石狮绿岛订房电话 孝义到离石司机电话 咸阳机场查机票客服电话 吉林市电力宾馆电话 首都国际机场宾馆电话 吉林市电力宾馆电话 咸阳机场查机票客服电话 外地车进京电话咨询 香港接电话多少钱 济阳移动开元大街电话 孝义到离石司机电话 咸阳机场查机票客服电话 郑州一厂麻辣猪蹄电话 孝义到离石司机电话 乐平萨米特瓷砖电话 首都国际机场宾馆电话 高唐到北京大客电话 金华湖溪公交车站电话 天马汇农家小院电话 东莞到义乌客车电话 高唐到北京大客电话 青海西宁南山公园电话号码 天马汇农家小院电话 深圳圣原养生代理电话 东莞到义乌客车电话 甲子汽车站电话 兰州火吧9号电话 石狮绿岛订房电话 杭州庆春新华书店电话 首都国际机场宾馆电话 沙头吉旅酒店电话 东莞到义乌客车电话 济阳移动开元大街电话 自由港量贩式ktv电话 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 无量仙宫 异世界:我!一生要强! 重生之闯山海 致黑暗中的你 不正经的魔导师 快连下载 亚星管理平台 亚星游戏官网 快连下载 百家乐官网 天马汇农家小院电话 东莞到义乌客车电话 兰州火吧9号电话 天马汇农家小院电话 葫芦岛森林中介电话 济阳移动开元大街电话 金华湖溪公交车站电话 首都国际机场宾馆电话 吉林市电力宾馆电话 郑州一厂麻辣猪蹄电话 高唐到北京大客电话 郑州一厂麻辣猪蹄电话 自由港量贩式ktv电话 咸阳机场查机票客服电话 外地车进京电话咨询 恒山一部饭店电话 外地车进京电话咨询 兴城板车联系电话 首都国际机场宾馆电话 外地车进京电话咨询 郑州一厂麻辣猪蹄电话 首都国际机场宾馆电话 甲子汽车站电话 沙头吉旅酒店电话 甲子汽车站电话 吉林市电力宾馆电话 咸阳南站汽车电话号码 金华湖溪公交车站电话 工农兵电话宜昌 深圳圣原养生代理电话