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
露脐装 修真小说官途 梦入洪荒 小说txt穿越小说 翻云覆雨猫 都市小说官场小说 嫂子 脱露脐装 修真小说小说封魔穿越小说 翻云覆雨88亿聘金 帝少宠妻太强硬小说EXO apink小说穿着高跟鞋的女尸 小说穿越小说 翻云覆雨小说 权路穿着高跟鞋的女尸 小说穿越小说 翻云覆雨EXO apink小说独立日小说横泽隆史的场合4 小说官场小说 嫂子 脱寂月 梦醒泪殇 小说死神肉文小说 zhidao.baidu.com横泽隆史的场合4 小说88亿聘金 帝少宠妻太强硬小说开苞 小说云阅小说网叶琳琅言情 小说免费阅读云阅小说网遗族 小说寂月 梦醒泪殇 小说克苏鲁神话+pdf+小说欲望与愿望,仇恨与守护...... 名为“奇迹”的力量往往需要付出代价 这是关于少年北星河,不堪忍受命运的安排,通过“奇迹”逆天改命的故事。 双日凌空,神秘再现,在科技崩溃的废墟中,万物迎来了无限进化! 穿越而来的沈凌,激活了自己的无限世界模拟器。 只要是花费足够的能量,就能够获得在模拟世界中得到的修为、武功和物品! 于是,在小李飞刀的世界中,沈凌获得了小李飞刀! 在大唐双龙的世界中,沈凌修成了剑心通明! 在蜀山的世界中,沈凌拿到了化血神刀! 在洪荒的世界中,他夺取了诛仙四剑……2100年,地球资源即将耗尽,唯一被人类发现的最适合生存的行星火星却凭空消失,一位科学家研究新型可持续发展能源,另一些科学家研究火星消失的原因。此时又有另一派组织觉得放弃地球,在宇宙中寻找其他适合人类生存的行星,遭到了意料中的外星文明……东方君从小无法修炼使其实力微弱,但因一次机遇,激活了体内沉睡着的黄金圣龙,就此获得了不属于这个大陆的力量,从此实力超凡。 结束了东面西方的明争暗斗,最终成为人类的第九代战神,并渡劫成真神。一朝穿越成为不学无术、荒淫无度的纨绔太子。 为了重塑自己的形象,得经得住诱惑、耐得住寂寞。 面对手下宦官的谄媚,朝中大臣的冷眼,一众弟弟的虎视眈眈,朱永笑了。 有母后临终前给的九十九道免死金牌,根本不慌好吧。 我就当着你的面捅了你,你能咋地?一个热血少年步入电子竞技后的故事。穿越成首富之子,生活乐无边。 某一天,二娘竟然为了钱,逼我娶女魔头。 为了自由,揭竿而起,我从今天起直播带货。 一不小心就暴富了是怎么回事? 在古代直播带货,后宅夫人们,不要太爱我!幽默穿越爽文,喜欢的朋友赶紧前来围观咯!首次在17K发表小说,还请大家多多支持!谢谢、谢谢、谢谢!(重要的事都要说三遍,呵呵!)其实没什么简介,冲就完事,奥力给干了兄弟们!没有永远的和平,也没有永远的战争。 要想努力的活下去,只有变得更强。
我契约了一棵青色樱花树 蓝星危,速回 起缘!起缘 人云亦允 御兽:开局契约战斗暴龙兽 噩梦降临时 刀光剑影何处问 想躺平,可我的机宠太卷了 我炸了地球后穿越 现世高手 某天意外飞升 网游之日月星辰 紫玉仙缘 重生之血光冲天 浮世短篇小说集 灰度区间 争天帝战 美人小村医 你要去哪个世界 抑郁者的世界 叶琳琅言情 小说免费阅读 智能 或者科技一类的小说 三国 小说 姜维 官场小说 嫂子 脱 官途 梦入洪荒 小说txt 遗族 小说 三国 小说 姜维 青羊 小说网 雪下的小说 小说 权路 母子相见 小说章 母子相见 小说章 开苞 小说 智能 或者科技一类的小说 露脐装 修真小说 云阅小说网 女主穿越 萌宝小说 叶琳琅言情 小说免费阅读 中国足球内幕 有声小说 穿越小说 翻云覆雨 智能 或者科技一类的小说 穿越小说 翻云覆雨 中国足球内幕 有声小说 横泽隆史的场合4 小说 EXO apink小说 护士小说 迅雷下载 叶琳琅言情 小说免费阅读 中国足球内幕 有声小说 中国足球内幕 有声小说 雪下的小说 官场小说 嫂子 脱 插入 人妻 换妻 换夫 小说 猫 都市小说 露脐装 修真小说 开苞 小说 云阅小说网 猫 都市小说 三国 小说 姜维 开苞 小说 穿越之丑颜沐妃 米妮红 小说 云阅小说网 青羊 小说网 寂月 梦醒泪殇 小说 女主穿越 萌宝小说 穿着高跟鞋的女尸 小说 插入 人妻 换妻 换夫 小说 母子相见 小说章 云阅小说网 护士小说 迅雷下载 独立日小说 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 阿怪新传 黑白魔都 玄幻:毛头小子穿越三界 灵魂书屋 心道行 皇冠登3出租 亚星管理平台 澳门葡京游戏官网 皇冠登3出租 亚星游戏官网 小说 权路 叶琳琅言情 小说免费阅读 插入 人妻 换妻 换夫 小说 寂月 梦醒泪殇 小说 克苏鲁神话+pdf+小说 官场小说 嫂子 脱 中国足球内幕 有声小说 中国足球内幕 有声小说 穿着高跟鞋的女尸 小说 插入 人妻 换妻 换夫 小说 猫 都市小说 克苏鲁神话+pdf+小说 智能 或者科技一类的小说 88亿聘金 帝少宠妻太强硬小说 三国 小说 姜维 护士小说 迅雷下载 青羊 小说网 叶琳琅言情 小说免费阅读 三级小说 乡村寡妇 88亿聘金 帝少宠妻太强硬小说 官场小说 嫂子 脱 开苞 小说 死神肉文小说 zhidao.baidu.com 小说 权路 穿着高跟鞋的女尸 小说 穿着高跟鞋的女尸 小说 猫 都市小说 云阅小说网 露脐装 修真小说 EXO apink小说