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
昆明11月中旬天气情况河南登封历史天气预报昆明201711月份天气预报昆明的2月天气预报昆明天气11月天气情况昆明11月中旬天气情况48小时天气预报太原昆明201711月份天气预报登封3.22天气寻甸天气状况查询昆明天气2月天气预报15天昆明201711月份天气预报荣成8号天气预报昆明天气2月天气预报15天昆明2017年10月份天气预报寻甸天气状况查询2014年登封天气预报昆明天气11月天气预报一周昆明天气11月天气情况2017年8月份昆明天气查询登封历年天气昆明天气11月天气预报一周登封3.22天气2016年11月份昆明天气表昆明十月份历史天气上海嘉定8月11日天气预报昆明天气11月天气预报一周2017年8月份昆明天气查询昆明11月中旬天气情况张家界7天气预报15天天气预报肖弈上一世瞎了眼爱上了林浩宇,最后林浩宇却杀了肖弈,王一泽替肖弈挡了一刀,王一泽死后肖弈抱着他的身体发誓,若有来生他一定会好好爱你,最后重生的故事被鲜血洗涤, 也不能使信念动之分毫 被黑暗笼罩, 光芒永不熄灭! 千年过往,揭露自己身世。 迪诺外传,暴露任务秘密~ 一切都是骗局? 不,你所想象的,远不及那一切的真相! 《米瑞斯之诺亚光辉》第二部强势来袭。 拯救阿玛迪斯星的征途中,也不妨一起来探寻,米瑞斯与米梦樱的秘密吧!不是意外,房东东因为幸运而被甄选,却只成为魔法星界的普通居民。设定小目标就是环游魔法世界,见识什么叫快乐星球。然而风云变幻,魔团会、族老会、真理会与皇经会几方势力暗流汹涌,无意身处其中自己也狼狈不堪。既然如此,那便是登上魔法的最高殿堂重权话事,宵小退散。普通大学生逆袭之路36岁的江左,把生活过得一团糟,正当他在懊悔时,突然回到了20年前,他重生了!由此他开启了他的开挂人生!陈渊穿越成为侦察连的兵,绑定一个很争气的系统。 系统很成熟,只要条件满足,自己就能签出技能,并且监督修炼。 从小成到大成,再到圆满,凡是他的技能,都会自行修炼,陈渊想努力,都没什么机会。 奈何他的系统实在太争气了,只是签到三年,他就成为全球特战之父。 一个另类的足球天才,一群热血的足球人,一切从零开始,逐步成长,从弱小变得强大,从中国走向世界。 足球理想、足球智慧、足球商业、国家精神、民族气度,所有元素都在《影球者》中,既虚幻又真实,在中华民族伟大复兴的路上,谱写我们的足球传奇。 本小说献给为中国足球腾飞矢志不渝,默默奉献,勤奋耕耘的人们。黑暗深渊异魔暴动,异魔王横空降世,天澜城危。 “叮。经系统检测,天澜城城主发布雇佣任务,剿灭异魔,是否接受?” “接受。”苏格望着那遮天蔽日的异魔,眼神炽热。 “叮。本着客户至上、任务第一的原则,宿主修为将临时提升到帝境,以便完成任务。” “任务完成,将有十分之一临时修为转化为永久修为,可与宿主原修为叠加。” 于是,人们震惊地看到—— 天澜城外,一剑光寒平地起,亿万异魔成飞灰。 脑子有一扇门,可以自由穿越异世界。 本来以为可以当个小倒爷,在平平无奇的古代世界享受财主生活,结果这个世界有佛,有妖,有儒,有道,有武者。   有人能力拔千钧,有人能飞天遁地。 千年人参要不要? 绝世神功要不要? 长生不老丹姚不远? 当姚不远带着高武世界的东西回来,美女要倒贴他,豪门世界,古武门派,争相而来,跪求宝贝。 姚不远心道,我能说这些东西都是垃圾吗?香港回归25周年纪念,经典港剧大时代反派丁孝蟹同人文。家庭,事业,爱情,一个男孩成长为男人,一只小螃蟹一步步蜕变为大佬孝。
我的老师吴泽英 诸天模拟 斩彦 循环启示录 八荒古帝 头七当天,我被校花借尸还魂 天魔,天狼 新世界灵士生存指南 巅峰守护神 都市之医神下山 万道祖庭 一个月过完这一生 雷帝之童养夫的崛起 曾经,曾经 兵王出征 重生动漫世界穿越 降僵除鬼记 仙人不长生 百年风雨王家村 小爷我不是公子 河南天气预报趋势 宿州市黄口镇天气 2014年登封天气预报 昆明天气11月天气情况 河南天气预报趋势 农历3月九寨沟天气 2014年登封天气预报 赣南端午时天气 上海嘉定8月11日天气预报 耶卢天气预报一周 大同2016年10月天气 大同2016年10月天气 2017年2月昆明的天气 宿州市黄口镇天气 昆明11月中旬天气情况 昆明天气11月天气情况 4月1日郑州登封天气 河南天气预报趋势 河南 天气预报 穿衣指数 昆明201711月份天气预报 宿州市黄口镇天气 昆明201711月份天气预报 河南 天气预报 穿衣指数 昆明天气11月天气预报一周 寻甸天气状况查询 2017年2月昆明的天气 河南天气预报趋势 河南登封历史天气预报 河南 天气预报 穿衣指数 上海嘉定8月11日天气预报 昆明天气11月天气情况 昆明天气六号到十号怎样 昆明的2月天气预报 昆明11月中旬天气情况 2016年11月份昆明天气表 昆明十月份历史天气 昆明的2月天气预报 2014年登封天气预报 2016年11月份昆明天气表 昆明2017年10月份天气预报 昆明十月份历史天气 赣南端午时天气 昆明11月4日天气 4月1日郑州登封天气 昆明天气2月天气预报15天 昆明天气六号到十号怎样 大同2016年10月天气 昆明十月份历史天气 2017年2月昆明的天气 张家界7天气预报15天天气预报 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 十三岁的一天 星光交际线:世界之眼 小神山里有一位仙家 群星挑战之星神之路 枫落栈桥,跃上云霄 欧博官网 百家乐官网 澳门葡京游戏官网 欧博官网 亚星游戏官网 大同2016年10月天气 昆明十月份历史天气 昆明十月份历史天气 昆明11月4日天气 昆明11月4日天气 农历3月九寨沟天气 2016年11月份昆明天气表 河南天气预报趋势 昆明的2月天气预报 昆明天气六号到十号怎样 登封3.22天气 上海嘉定8月11日天气预报 48小时天气预报太原 河南 天气预报 穿衣指数 赣南端午时天气 2016年11月份昆明天气表 4月1日郑州登封天气 昆明的2月天气预报 昆明的2月天气预报 登封历年天气 河南 天气预报 穿衣指数 2014年登封天气预报 2016年11月份昆明天气表 河南登封历史天气预报 昆明2017年10月份天气预报 昆明11月4日天气 大同2016年10月天气 上海嘉定8月11日天气预报 昆明天气11月天气情况 登封历年天气