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
五个月的宝宝吃碳酸钙好吗宝宝高烧后不喝奶粉40多天的宝宝睡前老哭宝宝用护理粉宝宝中耳炎经历五个月的宝宝吃碳酸钙好吗顺产侧切多久可以要宝宝40多天的宝宝睡前老哭宝宝脚上长小水泡生完宝宝后身体脾胃虚弱宝宝长期便秘喝什么蔬菜水管用?40多天的宝宝睡前老哭6个月宝宝腹部饱满宝宝长期便秘喝什么蔬菜水管用?宝宝腹泻不吃东西怎么办生完宝宝后身体脾胃虚弱2岁宝宝拉肚子能喝酸奶宝宝四个月C反应蛋白宝宝中耳炎经历五个半月宝宝血象高给宝宝吃什么奶粉宝宝四个月C反应蛋白宝宝脚上长小水泡宝宝耳被溃烂怎么办10个月宝宝吃奶时体温宝宝发烧大便干燥10个月宝宝吃奶时体温两岁宝宝口腔溃疡喷剂五个半月宝宝血象高B超时宝宝手掌张开的鲜血淋漓的战场,神秘的第三方势力,未完待续的故事…… 意外穿越进游戏世界的楚昱和盛追,在诧异和激动下开启了他们的游戏人生。 在不断和域界人洛羽的相处下,他们逐渐发现了这个世界里和游戏的不同之处,剧情中的漏洞究竟是bug还是阴谋? 友情、立场。 信仰的冲突下,他们的冒险究竟会如何发展呢。 碧波荡漾的归墟海,一万多座如珍珠般的岛屿,大的纵横数千里宽,小的只有几里宽,点缀在广阔的归墟海域,称之为归墟群岛……  诡秘力量复苏,元宇宙世界降临。   在这里,你能看到奇闻异录中的妖魔,恐怖故事里的鬼怪,甚至神话传说中那些古老的神祇!   在元宇宙世界中,所有人都在惶恐不安,心惊肉跳。   而江澈却发现自己能看到奇怪的提示。   于是……   在黄泉医院当护工,在阴间酒店当服务员,在轮回网吧当网管……甚至还在元宇宙世界建造了一座能够关押神明的监狱!   当江澈一次又一次完成诡秘挑战后,忽然发现。   他竟然已经成为了,诡秘之主。楚君玄一穿越,就遇到了神仙姐姐被人追杀,本以为会死,却被一块青玉所救…… 夺仙人之躯的楚君玄,随手一掏,就是仙家法宝;入住全是少女的秋水宫;与一众仙子、妖女打得火热;和李靖、秦叔宝、李淳风等大唐英豪们称兄道弟、斩妖除魔…… 妖魔两族来袭,人间经历大劫,七大妖王、八大魔头、九真五佛,高手如云,一场波澜壮阔的妖魔大战开启…… 作为寰宇中最高贵的混沌圣龙一族,他是最强一位,也是最后一位。三皇的陨落,是阴谋?或命运?还是,来自天外的威胁……一切的巧合不是偶然?转世成人,开始新世界……被卷入一场车祸意外的我,醒来之後,发现自己伫立在一片陌生的湖畔, 不但身体动不了,也无法发出声音。 因为这个莫名其妙的状况而陷入混乱, 於是放声大喊的瞬间,我却听到一句出乎意料的台词── “如果中奖就能再来一瓶!” 看……看样子,我似乎变成一台自动贩卖机了……! 我能够选择的行动,“仅限于”自动贩卖机本身具备的功能。 在无法自力行动、也不能跟他人对话的状态下,我能在异世界的迷宫存活下去吗?脑子有一扇门,可以自由穿越异世界。 本来以为可以当个小倒爷,在平平无奇的古代世界享受财主生活,结果这个世界有佛,有妖,有儒,有道,有武者。   有人能力拔千钧,有人能飞天遁地。 千年人参要不要? 绝世神功要不要? 长生不老丹姚不远? 当姚不远带着高武世界的东西回来,美女要倒贴他,豪门世界,古武门派,争相而来,跪求宝贝。 姚不远心道,我能说这些东西都是垃圾吗?沧海桑田,岁月轮转,我再次归来,破镜能否重圆呢?我不是坦克,但是我可以比坦克更能抗! 我不是法师,但是我可以比法师更暴力! 我不是刺客,但是我可以比刺客更诡异! 我不是牧师,但是我可以比牧师更能奶! 我只是个普通的战士,各位也可以叫我药神!我受的起!先帝十一年,紫薇星若隐若现,即大世将至,国运衰败。 道可道,非常道。王朝衰败,必有妖孽降世。 “朕之子出征天下,夺帝运,破死势……”
远离兴隆山的地方 穿越:我成了唐僧大徒弟 长平记 茅山鬼门 雪淞散文随笔集 异界奇遇录 万法升仙 何追录 妖精的契约签订 齐天大圣:轮回人间三千年 三国乱斗我在行 神中狂龙 传奇时空的我 大楚府兵, 曾经,曾经 灵域游神 年过三十 疯狂小崽崽 我夺舍了我的尸骨 剑客多情 两岁宝宝口腔溃疡喷剂 一岁七个月宝宝只吐不拉 3个月宝宝囟门3 宝宝长期便秘喝什么蔬菜水管用? 宝宝1岁前不能吃盐 宝宝吃辅食有什么好处 私立妇产医院害死宝宝 B超时宝宝手掌张开的 宝宝耳被溃烂怎么办 顺产侧切多久可以要宝宝 私立妇产医院害死宝宝 私立妇产医院害死宝宝 宝宝吃辅食有什么好处 宝宝需要偶尔换奶粉吗 五个月的宝宝吃碳酸钙好吗 宝宝中耳炎经历 3个月宝宝囟门3 宝宝发烧大便干燥 满月女宝宝有耳朵会有狐臭吗 40多天的宝宝睡前老哭 宝宝需要偶尔换奶粉吗 40多天的宝宝睡前老哭 满月女宝宝有耳朵会有狐臭吗 宝宝四个月C反应蛋白 生完宝宝后身体脾胃虚弱 宝宝吃辅食有什么好处 宝宝发烧大便干燥 满月女宝宝有耳朵会有狐臭吗 满月女宝宝有耳朵会有狐臭吗 宝宝1岁前不能吃盐 宝宝中耳炎经历 宝宝可以喝黑豆浆 宝宝用护理粉 五个月的宝宝吃碳酸钙好吗 宝宝耳被溃烂怎么办 10个月宝宝吃奶时体温 宝宝用护理粉 万通口腔溃疡散宝宝能用吗 宝宝耳被溃烂怎么办 宝宝腹泻不吃东西怎么办 10个月宝宝吃奶时体温 一岁七个月宝宝只吐不拉 五个半月宝宝血象高 3个月宝宝囟门3 宝宝长期便秘喝什么蔬菜水管用? 宝宝可以喝黑豆浆 私立妇产医院害死宝宝 10个月宝宝吃奶时体温 宝宝吃辅食有什么好处 2岁宝宝拉肚子能喝酸奶 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 巴别塔陨落 斩天丹帝 噬灵玄尊 重生在国民女神的演唱会 叶倾仙的传说 澳门葡京游戏官网 葡京官网 AG真人 澳门葡京游戏官网 欧博游戏官网 一岁七个月宝宝只吐不拉 B超时宝宝手掌张开的 3个月宝宝囟门3 宝宝脚上长小水泡 宝宝1岁前不能吃盐 宝宝中耳炎经历 一岁七个月宝宝只吐不拉 五个月的宝宝吃碳酸钙好吗 宝宝长期便秘喝什么蔬菜水管用? 宝宝吃辅食有什么好处 B超时宝宝手掌张开的 10个月宝宝吃奶时体温 给宝宝吃什么奶粉 给宝宝吃什么奶粉 顺产侧切多久可以要宝宝 2岁宝宝拉肚子能喝酸奶 一岁七个月宝宝只吐不拉 6个月宝宝腹部饱满 宝宝可以喝黑豆浆 万通口腔溃疡散宝宝能用吗 满月女宝宝有耳朵会有狐臭吗 宝宝腹泻不吃东西怎么办 宝宝可以喝黑豆浆 给宝宝吃什么奶粉 10个月宝宝吃奶时体温 两岁宝宝口腔溃疡喷剂 生完宝宝后身体脾胃虚弱 40多天的宝宝睡前老哭 3个月宝宝囟门3 3个月宝宝囟门3