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
前苏联列宁邮票60年代的价格奥运大福娃邮票价格富春山居图邮票市场价格56个民族大团结邮票羊年邮票图片前苏联列宁邮票60年代的价格邮票j90两张价格富春山居图邮票市场价格水乡邮票价格中国邮票纪76j147邮票富春山居图邮票市场价格84年的鼠邮票j147邮票水浒邮票价格中国邮票纪76三轮生肖邮票发行量十二生肖邮票册羊年邮票图片国际邮票展览邮票 兔小版十二生肖邮票册水乡邮票价格中国女排邮票三轮生肖邮票真假熊猫邮票纯银珍藏版三轮生肖邮票真假最佳邮票评选纪念张国际邮票展览如何收集邮票我出生那天,百鬼夜行,只为了我特殊的命理在一场灭门惨案中,我和堂弟成为了幸存者。在一系列事件的影响下,我们慢慢地陷入了一场深渊之中。凭借一本密术,我们慢慢揭开了真相的面纱……何为仙,何为凡。 仙为何生来便高凡人一等,受凡人供奉,享人间香火,天上仙喜乐则凡间人得益,天上神恼怒则凡间蚁哀苦。 蓝星之上,流传着各式各样的神话传说,无人不知,无人不晓,但却无人真正见过这些传说中的神明。 那他们究竟存在是否。 是抛弃凡人而去,还是被封印在了某处,而那些神话究竟是有人随意编造,还是神明有意传播在世间? 科学证实的,便是真的吗? 在这个充满科学的蓝星之上,究竟还有哪些秘密没有被探索出来。 当一个来自外界的绝世大能满怀好奇的来到这个与众不同的星球,他带来的究竟是救赎,亦或者毁灭呢? 这是一个流量玷污的时代! 为了赚快钱,他们只需要改编,抄袭,制作一些口水歌,再加上这个时期扭曲的审美,乐坛早已不复曾经。 凌风穿越到平行世界,一档娱乐节目现场! 公开怒喷评委的评价和批判这种翻唱、抄袭风气! 不出意外,他遭到评委和全网的抵制! 面对抵制和质疑,凌风现场写出《孤勇者》,瞬间燃爆全场,将评委和观众全都唱跪! 之后,《青花瓷》《本草纲目》《赤伶》一首首国风神曲诞生! 凌风一跃成为娱乐圈天王巨星!未来世界元宇宙大获成功,无数人涌入其中,有人攫取利益,有人躺平内卷。所有人都沉迷其中,无法自拔。但繁华的背后,却是文明倒退、社会秩序崩盘的恐怖危局。 一次意外,保安队长李朝阳救下了一位受伤的少女,却也因此被推到了元宇宙幕后争斗的风口浪尖,自此,开启了在现实和元宇宙中波澜壮阔的冒险之旅…… 保安队长李朝阳开启元宇宙冒险之旅想要变强吗?想要成为不可一世之人吗?去吧!去读书吧!没错我把一切都放在了那里! 学渣资质的单良表示:问题不大,大也没用。升级干就完了,另外赌狗必死。我以凤凰之身斩尽恶人, 我以血肉之躯除尽杀戮。 少年出生在一个普通到不能再普通的小村子里,无奈世界残酷至极,人和人,村和村,城和城等处处矛盾频发,少年父母因一些原因而被杀害,少年只能眼睁睁的看着,他愤怒,他一定要报仇,除尽世间杀戮。武道之途,乃与天争命,逆天而行,遭天罚万劫。世间唯有九脉者,脉与天合,顺天而行,身怀天地气运,迎劫渡身,逢凶化吉。 林辰本乃天赋异禀,为天纵骄子,修途一路高歌,遍处风光。因缘偶得奇功妙诀,断脉重修。从此遭同门羞耻,宗门遗弃,兄弟背叛,处遭唾弃。 待我重回巅峰,问鼎苍穹,势必一洗前耻,傲世凌天。为一诺,走遍九天十地,守一人,战至魂散魄灭,不屈,正是少年! 为情所动,因缘相聚,似世间多有不归人,半生,皆在途中! 纵使天赋非凡,却难逃命运坎坷,强者为尊的世界里,谁都,未敢回首! 爱他所爱,杀他该杀,男儿一世,枪断沧海,阵葬星云! 黑暗时代下,唯有北方星辰闪烁。
末世超级农场 九重深渊 师兄有亿点点强 风云之天下无魔 奇异规则 温柔总裁霸道妻苏夏曲皓琛 直播抓鬼:从鬼差升职到酆都大帝 阴阳殇2传 孤刀出鞘 天之道会发生什么 爱至深!爱至重 异世界保命 敢动我闺女,找死 另一个我! 神灵的影子 异度虚空 这个捕快太行了 逃亡笔记之冰球大作战 当患者走进异界 每天一个小小说 最佳邮票评选纪念张 韩熙载夜宴图 邮票 毛泽东诞生120周年邮票 羊年邮票图片 奥运大福娃邮票价格 最佳邮票评选纪念张 三轮生肖邮票发行量 韩熙载夜宴图 邮票 熊猫邮票纯银珍藏版 84年的鼠邮票 毛泽东诞生120周年邮票 毛泽东诞生120周年邮票 第四套人民币邮票珍藏册 第一套十二生肖邮票 前苏联列宁邮票60年代的价格 羊年邮票图片 四大发明邮票 吴作人熊猫邮票 姜伟杰 邮票 富春山居图邮票市场价格 第一套十二生肖邮票 富春山居图邮票市场价格 姜伟杰 邮票 十二生肖邮票册 中国邮票纪76 第四套人民币邮票珍藏册 吴作人熊猫邮票 姜伟杰 邮票 姜伟杰 邮票 熊猫邮票纯银珍藏版 羊年邮票图片 牛郎织女邮票小本票 56个民族大团结邮票 前苏联列宁邮票60年代的价格 中国女排邮票 三轮生肖邮票真假 56个民族大团结邮票 三轮生肖邮票发行量 中国女排邮票 水浒邮票价格 三轮生肖邮票真假 韩熙载夜宴图 邮票 国际邮票展览 四大发明邮票 j147邮票 牛郎织女邮票小本票 毛泽东诞生120周年邮票 三轮生肖邮票真假 第四套人民币邮票珍藏册 中国十二生肖邮票 铜章 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 我家地里有龙袍 重返1982 灵异复苏:开局一本百鬼录 齐天凶残 道诡提灯人 欧博官网 亚星官网 万利游戏官网 欧博官网 澳门葡京游戏官网 水乡邮票价格 邮票 兔小版 熊猫邮票纯银珍藏版 第四套人民币邮票珍藏册 水浒邮票价格 84年的鼠邮票 毛泽东诞生120周年邮票 牛郎织女邮票小本票 邮票j90两张价格 羊年邮票图片 邮票 兔小版 韩熙载夜宴图 邮票 第四套人民币邮票珍藏册 第四套人民币邮票珍藏册 奥运大福娃邮票价格 吴作人熊猫邮票 毛泽东诞生120周年邮票 水乡邮票价格 三轮生肖邮票发行量 中国女排邮票 富春山居图邮票市场价格 84年的鼠邮票 四大发明邮票 邮局卖邮票吗 邮票j90两张价格 三轮生肖邮票真假 水乡邮票价格 中国邮票纪76 中国女排邮票 中国女排邮票