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
宝宝长牙长上面好吗哺乳期贴面膜对宝宝有影响吗宝宝长牙抠耳朵吃米粉宝宝拉绿色便宝宝吃山药泥好消化吗宝宝长牙长上面好吗宝宝肠炎能吃阿莫西林吗宝宝长牙抠耳朵宝宝鼻窦炎会自愈吗宝宝出汗给吃什么宝宝吃完布洛芬就难受宝宝长牙抠耳朵吃米粉宝宝拉绿色便便怎么回事宝宝吃完布洛芬就难受宝宝9个月精细动作训练宝宝出汗给吃什么宝宝吃的米糊炖多久宝宝吃食物下去示意图宝宝吃食物下去示意图宝宝长的畸形牙齿图片宝宝鼻涕多喝鼻渊糖浆宝宝吃食物下去示意图宝宝鼻窦炎会自愈吗宝宝餐豆角做法大全集宝宝吃南瓜粥吗宝宝不吃配方奶粉断奶宝宝吃南瓜粥吗宝宝餐豆角做法大全集宝宝长的畸形牙齿图片吃米粉宝宝拉绿色便便怎么回事高中才开学一个月后,高一七班的大家都平凡而和谐的校园生活被一个奇怪的黑色软件打破了,这彻底改变所有人的命运。。每个人都是特殊的,都有着自己独特的能力,;每个人都是相同的,都生活在旧时代的废墟和新时代的巨型建筑中。2059年,高层掌管着一切。他们的腐朽统治遭到了人们的反抗。人们成立了革命军。而在这之中,一只特殊的小队,执行着特殊的任务……何家遭逢惊天大变,家道中落,父亲疯癫,母亲重病。 为了凑齐母亲的手术费,却被骗走祖传百年的老店。 获得鉴宝神瞳后,何林改写悲惨人生! 奇珍异宝,古玩字画,神瞳辨异,气运藏穴。 一双精金火眼,狂揽天下珍玩! 叶多多一次意外,穿越轮回隧道,成为魔法师。 爹娘之仇,婚姻不遂,迫使他修炼武魂,成为五州大陆上响当当的魔法师。 报仇,雪恨,药物为尊,灵火为荣。 修魂力,展魂气,晋魂环,固魂骨,复仇,是非恩怨,有那不败神话! 文弱书生能否凭一己之力搅动天下?看似平静的皇朝下又隐藏着何种暗潮?前朝为何覆灭?方悔的身世又有何秘密?穿越异界发现寿命只有两天,而且他的天帝父王居然要杀他。 “既然你们说我反了,那我就反给你们看!”然后天宫直接被夕玄给打穿了。 在神界他是天宫第一叛徒。 在地狱鬼王见到他了都要绕着走。 在修仙界他是正道之光,却被人叫老六。 在地球他是华夏守护神,“前方华夏,神明禁行。” 前六章剧情铺垫,可自行跳过。 简介无力,请上帝移步正文。(鞠躬欢迎!)股神林辰重生,为了看清人心,他放出破产假消息,结果让他心寒,不过却收获真正的友情,亲情和爱情……为了男人的承诺,萧晨强势回归,化身美女总裁的贴身保镖,横扫八方之敌,谱写王者传奇!   他——   登巅峰,掌生死,醒掌天下权,醉卧美人膝! —————— 小舞的微信公众号:寂mo的舞者,可以去关注哦! 小舞的QQ:1589045849,可以去加好友! 唯舞独尊①群:545765633!   为了救人,穿越古代的赵亨义娶了个克夫的丧门星,一同带回家的,还有丧门星那六个拖油瓶妹妹。 什么?一个媳妇六个小姨子养不活?不存在的! 看我带着乡亲们种田打猎搞副业,偷偷发展高科技,昂首阔步新天地! 朝廷腐朽,皇帝昏庸,不给百姓留活路? 那就掀翻这鸟朝廷,杀了那狗皇帝! 草原蛮族年年寇边,岛国强盗肆虐海疆,西方贼人觊觎中原? 来,豺狼虎豹往这看,看看你亨义爷爷手里这杆二十连响的火铳它帅不帅! (本文内容纯属虚构,请勿与现实生活相联系,请勿在现实生活中模仿,剧情如有雷同,纯属巧合!) 这是校园修仙,但不是一般的校园修仙! 每个人有自己的擅长【科目】,法术技能统统变成了学科名词: 【一般过去时】【乘方】【一次函数】【平面直角坐标系】…… 校园修仙,很校园!
全民神明:我信徒是大科学家 天云笑仙录 开局觉醒李白模板 星辰之光幻界之月 我好想,再见你一面 生灵世界甄选游戏 掌中神佛 救赎的傀儡 京城小少爷 修真身份被曝光了 萌战无双之火与剑 魔证三千道 一界同生 两个欢喜冤家 许你一世偏宠 逆天覆云传 为武林除害 末日世界之异能觉醒 异世之随身召唤 宝宝不爱吃配方奶粉 宝宝吃银黄颗粒下火吗 宝宝吃的米糊炖多久 宝宝吃山药泥好消化吗 宝宝不爱吃配方奶粉 宝宝不喝奶瓶会饿瘦吗 宝宝吃的米糊炖多久 宝宝出汗过敏怎么办吃什么药 宝宝不吃配方奶粉断奶 宝宝出急诊腹泻怎么办 宝宝被蚊子咬了特别红 宝宝被蚊子咬了特别红 宝宝测胎心结果 宝宝吃银黄颗粒下火吗 宝宝长牙长上面好吗 宝宝吃山药泥好消化吗 宝宝吃母乳的时间安排 宝宝不吃配方奶粉断奶 宝宝脖子湿疹反复发作 宝宝长牙抠耳朵 宝宝吃银黄颗粒下火吗 宝宝9个月精细动作训练 哺乳期贴面膜对宝宝有影响吗 宝宝吃完布洛芬就难受 宝宝出汗给吃什么 宝宝测胎心结果 宝宝不吃配方奶粉断奶 哺乳期贴面膜对宝宝有影响吗 宝宝脖子湿疹反复发作 宝宝不吃配方奶粉断奶 宝宝吃山药泥好消化吗 宝宝吃一会玩一会 吃米粉宝宝拉绿色便 宝宝长牙长上面好吗 宝宝餐豆角做法大全集 宝宝吃山药泥好消化吗 吃米粉宝宝拉绿色便 宝宝吃的米糊炖多久 宝宝测胎心结果 宝宝9个月精细动作训练 宝宝吃南瓜粥吗 宝宝出急诊腹泻怎么办 宝宝长期吃鸡蛋好不好 宝宝吃母乳的时间安排 宝宝吃完布洛芬就难受 宝宝吃一会玩一会 宝宝被蚊子咬了特别红 宝宝吃南瓜粥吗 宝宝测胎心结果 宝宝肠炎能吃阿莫西林吗 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 网游:我在超神空间无敌了 转生异界百兽岛之史莱姆篇 双眼往前看 圣灵星皇子到地球做大少 弟弟是个假的?! 百度 百度 百度 百度 百度 宝宝不喝奶瓶会饿瘦吗 宝宝肠道有细菌的症状 宝宝吃母乳的时间安排 宝宝吃南瓜粥吗 宝宝测胎心结果 宝宝餐豆角做法大全集 宝宝吃银黄颗粒下火吗 宝宝测胎心结果 宝宝长牙长上面好吗 宝宝吃一会玩一会 宝宝长牙抠耳朵 宝宝鼻涕多喝鼻渊糖浆 吃米粉宝宝拉绿色便 宝宝出急诊腹泻怎么办 宝宝肠道有细菌的症状 吃米粉宝宝拉绿色便便怎么回事 宝宝吃山药泥好消化吗 哺乳期贴面膜对宝宝有影响吗 宝宝吃南瓜粥吗 宝宝出急诊腹泻怎么办 宝宝吃食物下去示意图 宝宝吃南瓜粥吗 宝宝吃银黄颗粒下火吗 宝宝测胎心结果 宝宝长牙长上面好吗 宝宝吃一会玩一会 宝宝长牙抠耳朵 宝宝鼻涕多喝鼻渊糖浆 吃米粉宝宝拉绿色便 宝宝鼻涕多喝鼻渊糖浆 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网