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
宝宝多大吃盐最合适4个月的宝宝能做高压氧吗5个月宝宝服用头孢后出荨麻疹3个月宝宝能不能坐太久宝宝舌苔一直黑黄宝宝多大吃盐最合适宝宝出生五分钟没哭5个月宝宝服用头孢后出荨麻疹宝宝脑发育不好怎么办宝宝扁条体发炎病毒性宝宝脸上长了囊肿能治好吗5个月宝宝服用头孢后出荨麻疹九个月宝宝能经常坐吗宝宝脸上长了囊肿能治好吗2岁宝宝拉水样绿色大便宝宝扁条体发炎病毒性三个月宝宝不达标生完宝宝两个多月来月经没有反应生完宝宝两个多月来月经没有反应宝宝心理性便秘怎么办8个月宝宝秋季腹泻不发烧生完宝宝两个多月来月经没有反应宝宝脑发育不好怎么办宝宝6个月要补钙吗宝宝感冒流鼻涕睡觉不好0到1岁宝宝哭闹原因宝宝感冒流鼻涕睡觉不好宝宝6个月要补钙吗宝宝心理性便秘怎么办九个月宝宝能经常坐吗这是妖,神,佛,兽,冥,人,阿修罗七界 这是师徒五人反抗天道的故事 一场即将到来的,你没见过的西游,拉开了序幕!穿越平行世界,开局就被女星污蔑,沦为史上最强渣男。 结果开启搞事系统。 从系统开启的那一刻,就注定严谨是娱乐圈的一股泥石流。 面对媒体: “我说那不关我的事情你信吗?!” “真的,她说要蹭我的流量,所以……主动找我,我真是无辜的啊!” “你们不相信?我审美是在线的,就她那样的……我也瞧不上啊!” 凭借着自己的才华,他让网友又爱又恨。 甚至还被亲切的称之为——娱乐圈质检员!天庭中的各类神仙,鬼魂化为人类前来报到。 男主杨贺和女主叶嫣也是由鬼魂幻化而来。 永远也不会让读者猜到下面的剧情永远是我的宗旨。 简介无奇,内容劲爆。 从小到大开心搞笑的人生写照。世界变了模样,我既然有了这样的能力,那就让我试试吧...... 凡尘俗世,流传甚广无非两点,人间美食,风花雪月。古镇老鹅,讲美食老鹅的演变,述经营老鹅人的艰辛。大背景掩映人生起伏,小故事衬托生活兴衰,品味的是绵延百年的美味,品尝的是人情世故和人间冷暖。整篇故事时间跨度从1972年到2020年,以各个历史时期的重大变革为背景,讲述乡镇生意人对政策的领悟和积极置身其中努力奋斗的经历,以他们成功或失败的经验向人们展现一道人间美食---老鹅。通篇故事将小说主人公的坎坷经历、命运兴衰和老鹅的形成、发展和走向巅峰、成为特产、列入非物质文化遗产紧密相连起来,增强着故事的趣味性和可读性,有较强的区域文化、习俗代入感。整篇故事给人的感触是“岁月总是在过往与未来间穿梭,人生的最好状态是活在当下过好眼前。生,咱就努力地存在,活,咱就坚强地奋争,坚信每个人生活都是自有安排的,天意与努力各占半成……!”。 纪历元年,战争爆发,科尔特城市陷落,科尔特内形势复杂,官方为了取得科尔特城市陷落的秘密,派出萤火虫小队前往救援任何生物受到攻击,都会感到疼痛,害怕,或是露出破绽,但是,艾斯不会有那种感觉。 ——亚波人一个名为往生界面的神秘存在将已“死去”的人们复活化作超界者于各个界面来回穿梭,执行各种任务。 往生界面——“签下签约,死亡或是活下去变得更强,由你自己决定。” 运气亦可能是实力的一部分....长临渊黑暗中总有一双眼睛盯着你 阴谋算计?在绝对的实力面前全是狗屁! 修炼瓶颈?在无敌天资面前就是笑话。
质检女神:开局检查焰灵姬 E伊由路音曲文艺一 浮生二三事 书说先秦 医世神婿 一气化神 W语言 末日我在海里抓鲨鱼 我的队友非人哉 郭十二传 都市:我有复制拿来吧你! 科希世纪 被遗忘的诛神者 路人笔记 天狼星之落花传说 最强杂役 一不小心偷到了绝世宝物 超绝世风云 荒村游记 幽异之王 逗刚出生的宝宝没反应 宝宝出生五分钟没哭 4个月的宝宝能做高压氧吗 藻油dha胶囊宝宝怎么吃 逗刚出生的宝宝没反应 5个月宝宝服用头孢后出荨麻疹 4个月的宝宝能做高压氧吗 三岁宝宝发烧声音嘶哑 宝宝多大吃盐最合适 宝宝肠胃炎精神不好 0到1岁宝宝哭闹原因 0到1岁宝宝哭闹原因 3个月宝宝能不能坐太久 宝宝出生五分钟没哭 宝宝多大吃盐最合适 宝宝舌苔一直黑黄 三岁宝宝发烧声音嘶哑 0到1岁宝宝哭闹原因 怀孕宝宝在一侧着床吗 5个月宝宝服用头孢后出荨麻疹 宝宝一岁了还可以喝二段奶粉不 2岁宝宝拉水样绿色大便 怀孕宝宝在一侧着床吗 宝宝脸上长了囊肿能治好吗 宝宝扁条体发炎病毒性 一岁宝宝牙齿长歪了 0到1岁宝宝哭闹原因 4个月的宝宝能做高压氧吗 怀孕宝宝在一侧着床吗 0到1岁宝宝哭闹原因 宝宝舌苔一直黑黄 6个月宝宝用多大奶瓶 3个月宝宝能不能坐太久 宝宝多大吃盐最合适 宝宝6个月要补钙吗 宝宝感冒流鼻涕睡觉不好 3个月宝宝能不能坐太久 三个月宝宝不达标 一岁宝宝牙齿长歪了 2岁宝宝拉水样绿色大便 宝宝感冒流鼻涕睡觉不好 2到3岁宝宝呼吸急促 逗刚出生的宝宝没反应 三岁宝宝发烧声音嘶哑 宝宝脸上长了囊肿能治好吗 6个月宝宝用多大奶瓶 宝宝肠胃炎精神不好 宝宝感冒流鼻涕睡觉不好 一岁宝宝牙齿长歪了 宝宝出生五分钟没哭 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 诸星浩劫 武侠世界的慕容复 重生之太虚尊圣 怒号光明:凋零 修真破天记 葡京官网 快连下载 欧博官网 葡京官网 皇冠登3出租 宝宝感冒流鼻涕睡觉不好 4个月的宝宝能做高压氧吗 1岁宝宝腹泻呈喷射状 3个月宝宝能不能坐太久 宝宝6个月要补钙吗 三个月宝宝拉深绿色屎 宝宝心理性便秘怎么办 宝宝出生五分钟没哭 宝宝一岁了还可以喝二段奶粉不 三个月宝宝不达标 宝宝多大吃盐最合适 一岁宝宝牙齿长歪了 5个月宝宝服用头孢后出荨麻疹 宝宝一岁了还可以喝二段奶粉不 3个月宝宝能不能坐太久 5个月宝宝服用头孢后出荨麻疹 4个月的宝宝能做高压氧吗 2岁宝宝拉水样绿色大便 宝宝舌苔一直黑黄 九个月宝宝能经常坐吗 生完宝宝两个多月来月经没有反应 3个月宝宝能不能坐太久 6个月宝宝用多大奶瓶 1岁宝宝腹泻呈喷射状 4个月的宝宝能做高压氧吗 怀孕宝宝在一侧着床吗 宝宝舌苔一直黑黄 5个月宝宝服用头孢后出荨麻疹 宝宝舌苔一直黑黄 怀孕七个月判断男宝宝你宝宝