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
电话号码随身宣城纪叟酒楼电话宁南金沙酒店电话淄博到天津西的动车时刻表查询电话健美丽人电话电话号码随身郑州公交站查询电话宁南金沙酒店电话河北承德小区地址电话是多少临清公交公司电话锦州美客电话是多少钱宁南金沙酒店电话吉林市金丰采摘园电话锦州美客电话是多少钱宁南金沙酒店电话上街移动大厅电话去英国旅行需要买电话卡吗任丘购物中心电话号码健美丽人电话青岛到临邑的汽车电话吴江大润发地址和电话号码任丘购物中心电话号码河北承德小区地址电话是多少南沙圣地亚哥水疗电话益阳市区厨嫂当家电话宁波钱湖渔港电话益阳市区厨嫂当家电话白城市麻辣烫电话青岛到临邑的汽车电话番禺滋粥楼南村电话秦风被几位师父们安排了五纸婚书,个个祸国殃民! 冰山总裁、美女千金、清新萝莉、高冷女神、温情御姐…… 但他此番下山,却是为了悬壶济世,造福万民! 于是,他开启了自己的退婚之路……当黑暗侵袭,有人跪下,有人放弃。 而我们,会鲜血流尽,战斗到底。 而我,就是这诸天万界的主!好不容易将境界修炼到神圣境第九重巅峰,却连番遭遇厄运,身体暴毁却成就了化聻途径,随后进入新的界域,至灵启散乱的意识逐渐归聚,但是记忆残破,至灵启对以前修炼功法的记忆几乎损毁殆尽。因此他只能根据残破的记忆,一边壮大灵魂和聻体,一边努力开创全新的功诀。 经过精心推演和不断完善,终于将科学与神学二者相结合,开创出了高于二者的全新修炼理念《灵学》,以及实际修炼功诀《超微至灵诀》,就此由聻入灵超越仙神,成就至灵之功,从此走上了超越此前所有强者的修炼之路。功成之后,至灵启便将整个太阳系的运行轨迹位置进行了优化复定,并对母星地球的水陆位置分布进行了完善复定,使其灵气充裕更适合人类的生存和修炼。“滴,恭喜主人辅助击杀一位炼气四层修炼者,获得5点仙币”此时,石佳杭脑中传来机器人小妾的提示音。   “纳尼?辅助击杀?还获得5点仙币,MMP这是劳资击杀的好不”石佳杭先是一愣,随后反驳骂道。   “主人只是把人打成重伤,被别人击杀,所以只是辅助击杀”   石佳杭瞬间无语,感情,这仙币必须要杀人才得获得啊。辅助击杀一个炼气四层才5点仙币,那我昨天花的600仙币,得杀多少人才赚得回来啊。   “小妾,不辅助击杀,是我本人击杀,能获得多少仙币?”   “60仙币”   “卧槽。MMP,坑,太坑了,悬殊这么大,小妾,你丫的不早告诉我,这波亏大了”   “你又没问”   ......天外天,这个叶玄梦寐以求到达的地方,而叶玄并不知道的是,在这背后还有一个更加庞大的世界,一个无法理解的世界!余晓,一个悲苦的人,在前世被丧尸无情地抛下高楼而亡,未曾想重生到灾难发生前,但似乎一切都没有什么变化,直到他鼓起勇气克服心理障碍砍死了第一只丧尸后,他的助手就来了,那是一个叫迷宫的游戏系统,末世中超人类可以使用异能对抗丧尸,而他则与众不同,作为凡人之躯却可以砍倒一切,乃至改变整个世界,就因为他可以被冈布奥附体。江边夜里,爷爷将我捡来,取名江夜。 我本以为自己就是一个孤儿,却不曾想十八岁那年,身边开始怪事频频…… 我没有想过,江边飘来的红木棺材,改变了我的一生…… 我更没有想过,这辈子会和一口棺材纠缠不清……(这是一部 经典港式剧情 的反转、反转再反转的故事,其间警察不是警察、兄妹不是兄妹,父子不是父子,恋人不是恋人,想死的时候死不成,不想死的时候却无力回天的烧脑故事。) 港岛警方追查一件连环催眠自杀案,受害者已有多人,死者都跟未来集团有关,而未来集团的创始人顾长孝,将会是下一个目标。 顾长孝 自小就有【针眼恐惧症】的心理病,惧怕尖锐的东西,因此从来不去医院看病,但是确诊肺癌晚期,儿女们为了表现孝心好分得更多财产,强制把顾长孝送到医院治疗,从而上演了一出家庭战争。 顾长孝逃出医院,被一个叫鬼点子的人催眠,并执行了一次疯狂的自杀,那就是同一时体验跳崖而死、上吊勒死、毒死、火烧、水淹而死 5 种死亡。 疯狂的自杀方式,让顾长孝很兴奋,但是,在临死时,他发现了最终的阴谋,不甘就这么死了,最终出意外,顾长孝被送到医院,醒来的时候,看到护士给他打针,他的【针眼恐惧症】顿时犯了,活活把自己吓死。 从此,复仇的大戏被拉开!(架空世界观) 20世纪中叶,由于人类无节制的开发导致地球生态环境急剧恶化,在联合国的推动下,特别联大通过法案成立了联合国航天局统筹实施火星移民计划——哥伦布计划 人类第一次在茫茫星海留下属于自己的印记,谱写属于自己的太空史诗因一封邀请函再起的故事,这也是新的续篇。 命运的挑战?弥补的救赎? 不哦,或许……不仅仅是这样。 记住,实力为重,却非最上。
如果有重开 引人入局 神探太司懿之明王出世 灵兵时代 霹雳元武 全能禁区之王 万界最强剑师 异瞳通灵者 时间的尽头之遗落之境 疯狂宠爱的妻子 源码解放 无敌从异世界开始 无极枪圣 :曜灵 都市无敌修真 恶来传 异界侦探探案笔记 我带着面板在诸天轮回 我不是歌手 人世间之正道之光 宁波钱湖渔港电话 上街移动大厅电话 宁波民航管理局电话 健美丽人电话 宣城纪叟酒楼电话 白城市麻辣烫电话 宁波民航管理局电话 沧州市区租车公司电话 慈溪枇杷采摘电话 吉林市金丰采摘园电话 天津到大同的路线查询电话 天津到大同的路线查询电话 南沙圣地亚哥水疗电话 上街移动大厅电话 电话号码随身 益阳市区厨嫂当家电话 廉江至珠海车订票电话 宁波钱湖渔港电话 温州星隆海鲜电话号码 宁南金沙酒店电话 上街移动大厅电话 宁南金沙酒店电话 温州星隆海鲜电话号码 任丘购物中心电话号码 临清公交公司电话 广东植物博物馆电话 宁波钱湖渔港电话 温州星隆海鲜电话号码 温州星隆海鲜电话号码 慈溪枇杷采摘电话 健美丽人电话 乳山火车站订票电话 淄博到天津西的动车时刻表查询电话 电话号码随身 南沙圣地亚哥水疗电话 益阳市区厨嫂当家电话 淄博到天津西的动车时刻表查询电话 宁波民航管理局电话 南沙圣地亚哥水疗电话 福州中华联合保险公司电话 益阳市区厨嫂当家电话 沧州市区租车公司电话 青岛到临邑的汽车电话 廉江至珠海车订票电话 锦州美客电话是多少钱 乳山火车站订票电话 天津到大同的路线查询电话 益阳市区厨嫂当家电话 广东植物博物馆电话 去英国旅行需要买电话卡吗 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 大明:满朝奸臣,你让我登基称帝? 英雄无敌之乱世幻想 风烈苍穹 通玄者 神罚之劫 葡京官网 欧博官网 亚星管理平台 葡京官网 皇冠登3出租 沧州市区租车公司电话 上街移动大厅电话 番禺滋粥楼南村电话 电话号码随身 淄博到天津西的动车时刻表查询电话 福州中华联合保险公司电话 宁波民航管理局电话 吉林市金丰采摘园电话 宁波民航管理局电话 白城市麻辣烫电话 南沙圣地亚哥水疗电话 宁波民航管理局电话 乳山火车站订票电话 南沙圣地亚哥水疗电话 靖江新闻热线电话 靖江新闻热线电话 温州星隆海鲜电话号码 河北承德小区地址电话是多少 宁南金沙酒店电话 沧州市区租车公司电话 番禺滋粥楼南村电话 吉林市金丰采摘园电话 益阳市区厨嫂当家电话 宁波钱湖渔港电话 广东植物博物馆电话 健美丽人电话 锦州美客电话是多少钱 健美丽人电话 天津到大同的路线查询电话 任丘购物中心电话号码