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
做你的秒钟歌词粤剧琵琶行歌词歌词higher我可以牵起你的手歌词歌词 陌生人 叶倩文做你的秒钟歌词歌词望天涯歌词higher波斯猫华语群星歌词歌词想要唱歌给你听音乐快乐的节日歌词做你的秒钟歌词歌曲忘情草视频带歌词音乐快乐的节日歌词歌词higher第一句是我会想你歌词信心旅行的歌词歌词 陌生人 叶倩文歌词 陌生人 叶倩文回忆和爱情歌词李白歌词.doc《海底》歌词波斯猫华语群星歌词至爱your songs歌词weve got tonight 歌词一家老小向前冲 歌词我可以牵起你的手歌词海南游g《海之南》歌词回忆和爱情歌词《西风的话》简谱歌词这里没有无尽的斗气,没有瑰丽的魂环,有的只是无尽的诗词和读书人为尊的世界。 浩然正气孕忠魂,文华之气惊诸圣。 拳打诸子百家,脚踏天妖南蛮。 无数读书人长叹,天不生孟飞,儒道万古如长夜!离家出个走,居然遇到了一名博士。 他们之间的缘分远不止一面之缘,一些奇奇怪怪的东西随着两人的接触,渐渐跑进了他的生活。 古怪离奇的东西变成了自己的日常。 世界的本来面目被一点点揭开,能窥觑到的每一个部分都让人惊异万分且难以承受! 而这些仅仅是大千世界的九牛一毛而已! 就算知道了太多太多,需要很长时间去消化。 那这,是否又真的是世界最真实的那一面呢? 这博士,究竟又是怎样的…人呢? 他又小心翼翼的维护着怎样的秘密…? 【对世界的新认知!】 【对科技的惊发现!】 【对未来的再思考!】 【认知崩塌重新排序的宇宙狂想曲!】我本无心张狂,奈何世间太多魔。可怜世上情与义,还值几两碎银?这世道,我要换,你若挡,那便战!查理的家族发展史 本文讲述男主作为高考村唯一一名考上星际学院的考生在一场意外中离奇穿越到一个学习为主的修学世界。 文中还有大量脑洞大开的故事。  21世纪的是一个第一次接触魔兽争霸的业余玩家,变身绿皮兽人,掌控兽族大厅。   拥有精湛剑术的剑圣   深受萨尔信任强大的萨满祭司   战场上的他们英勇无畏,总是身先士卒,挥舞着战戟横扫敌军的牛头人酋长   行踪神秘、足智多谋的暗影猎手   何解以族长之名,踏上复兴兽族的征程 五个貌美如花的师姐,一个个都不是省油的灯。嗜好、品味、性格,各异。可是,她们却拥有一个共同的爱好——宠弟狂魔。一群疯子想把世界毁掉,同时一朵以血浇灌的花正在绽放。 在那一天公司聚会陆游喝醉了,一觉醒来看着尸骨遍野的周围以为到了乱葬岗却不成想那是张角的黄巾起义。 至此他默默的加入了十八诸侯,看见了三英战吕布、见证了火烧赤壁败走华荣、也逢上了秋风五丈原、三家归晋。穿越到诡异的世界,我的金手指是青蛙军团? 你且看我怎么打穿这个世界。 “宝宝呱,你怎么埋人的手法那么熟练?” “呱~(唯手熟尔。)” “法海呱,总有刁民要害寡人,寡人怕怕。” “呱,呱呱~(施主莫怕,大威天龙,大罗法咒……)” “灰太呱,我饿了。” “呱~(老大,我给您做了满汉全羊……)” …… 唉,我也想当个普通人,可是我手底下的呱他不允许啊。
圣人鱼 晚上不睡觉 第六天女皇 魔法傲世录 武冥诀 复定天地 屠魔傻儿 穿越都市被倒追 返虚 终焉之潮 掠过环宇之巅 亡者遗梦 灵气复苏:我统帅百万阴灵 谁惊悚? 苟延残喘罢了 神秘复苏:融合神级天赋 无双重创 灵魔使 科幻长城 嗜血天团 一家老小向前冲 歌词 第一句是我会想你歌词 信心旅行的歌词 歌词 陌生人 叶倩文 粤剧琵琶行歌词 海南游g《海之南》歌词 吟游诗人-老干妈歌词 岚?^歌词 陈粒歌词绝对占有相对自由 歌曲忘情草视频带歌词 羊肉面歌词图片 羊肉面歌词图片 至爱your songs歌词 第一句是我会想你歌词 做你的秒钟歌词 weve got tonight 歌词 泽野弘之ace歌词 一家老小向前冲 歌词 小城故事古筝歌词 歌词higher 君子歌歌词 歌词higher 小城故事古筝歌词 《海底》歌词 歌词想要唱歌给你听 农民黄家驹 歌词 一家老小向前冲 歌词 小城故事古筝歌词 小城故事古筝歌词 陈粒歌词绝对占有相对自由 歌词 陌生人 叶倩文 君子歌歌词 我可以牵起你的手歌词 做你的秒钟歌词 至爱your songs歌词 weve got tonight 歌词 我可以牵起你的手歌词 吟游诗人-老干妈歌词 至爱your songs歌词 你太善良的歌词是什么 weve got tonight 歌词 岚?^歌词 回忆和爱情歌词 泽野弘之ace歌词 音乐快乐的节日歌词 君子歌歌词 羊肉面歌词图片 weve got tonight 歌词 农民黄家驹 歌词 信心旅行的歌词 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 有风自南落长安 异世成就至高 凡游梦 归往之间 大宋:神级抽奖系统 百家乐官网 澳门葡京官网 葡京官网 百家乐官网 万利游戏官网 做你的秒钟歌词 回忆和爱情歌词 岚?^歌词 监狱人民警察之歌词谱 你太善良的歌词是什么 歌词想要唱歌给你听 我可以牵起你的手歌词 粤剧琵琶行歌词 歌词 陌生人 叶倩文 粤剧琵琶行歌词 吟游诗人-老干妈歌词 一家老小向前冲 歌词 音乐快乐的节日歌词 至爱your songs歌词 君子歌歌词 吟游诗人-老干妈歌词 歌词想要唱歌给你听 君子歌歌词 粤剧琵琶行歌词 第一句是我会想你歌词 《西风的话》简谱歌词 李白歌词.doc 《西风的话》简谱歌词 你太善良的歌词是什么 信心旅行的歌词 你太善良的歌词是什么 农民黄家驹 歌词 weve got tonight 歌词 羊肉面歌词图片 《海底》歌词