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
磐石 磐石 耶稣基督歌词橙江月风歌词完整版梦太晚完整版歌词歌词里有cola梧桐树歌词全谱磐石 磐石 耶稣基督歌词?V月 lrc歌词梦太晚完整版歌词深海少女歌词lrc歌词红彤彤的大眼悟刘德华歌词下载梦太晚完整版歌词青梅当竹马歌词悟刘德华歌词下载仰望的歌词儿歌词红彤彤的大眼相宾相爱歌词离骚 歌曲带歌词离骚 歌曲带歌词歌曲爱从草原来歌词心经 歌词离骚 歌曲带歌词深海少女歌词lrc不会喜欢你歌词歌词 舍不得的舍得歌词紧捱我手歌词 舍不得的舍得不会喜欢你歌词歌曲爱从草原来歌词青梅当竹马歌词这里是个多彩的世界,温情的世界,现实的世界,血腥的世界。极北冰垣、泊纳格岛、诡异的腥魂森林、神秘的迷零森林、残酷的努乐哈拉大沙漠、毒气弥漫的蛮荒沼泽,神级魔兽紫羽玄鸟,超级神兽赤须青龙…………主角将在这个世界重生,开始他的峥嵘旅程。 叶云运气爆棚意外得到一个高纬度制造的次元面板, 并且利用面板走上了穿越诸天万界......一个小山村走出来的小胖子修仙的故事,貌似还是个穿越者来着。王朝覆灭,群雄并起,藩王割据。在名如草芥的乱世,唯有真正的江湖儿女才能真正的逍遥。记忆,是人的意识当中所记录的东西,是让人痛苦,又或者承载着美好回忆的代名词。 想要修改记忆的话,就必须改变历史,改变意识存记录下这段记忆时所发生的事情,这本事不可能做到,但是由于它,“记忆修改所”的出现,让这一切都可以得到转变。 ……我只想安安稳稳送个外卖,哪想到有一天居然真的黄袍加身! 还是在异界!! 送外买送到异界的恐怕只有我一个了吧? 看着满目荒凉的异界,杨一暖苦笑一声,开始了异界探险之旅… 外卖是不会再送了,星际贸易才是我的主业! 玻璃球换黄金,香水换翡翠,一个黑心倒爷就此诞生… 异界投资建工厂,寻宝探矿搞开发,从今天开始,我就是杨总! 新世界首富,异世界征服者,就此诞生!!这是神的世界!这是魔法的世界!这是我的世界! 这是一个小角色,通过一步步努力,最终踏上成神路,创下永恒传说的故事!邵子伟参加自卫反击战自摆乌龙,误饮催情酒,艳遇黎氏慧贞,回国途中遇女兵欧阳文心,无功退伍,为解班长一家困难,先后倒卖国库劵、承包粮油加工厂、开办歌城、进入房地产、创办风投公司,先后与彭曦、方兰、金裕、向彤、孟雨欣、高岚、潘颂、顾秋燕、梁心蕊、桑雅、马文玉有感情瓜葛,得知自己患弱精症后,意外获得了乔慧的爱情,在绝望之中相认双胞胎子女,实现人生赢家。系统傍身,杀一人,活一天; “以死神的名义,你必须死!” “以死神的名义,毁灭他们!” 死神:“呃...你不要坏我名声!”在这个武力值决定一切的世界里,送货小子偶遇大小姐,一些啼笑皆非的故事在两个人之间展开,慢慢的一些黑暗势力也都展现出来,看送货小子是怎样一步步逆袭的。
风流毒公子 马拉快跑 十主传 温柔总裁霸道妻苏夏曲皓琛 九魂乱世 何以通天 一品权相 晤极锦玄 探险日记1 越穿次元副本 苍生无极 全球第一人 阁榭 剑道崛起 末世之诸神黄昏 惊悚游戏小说 满朝佞臣,孤要做千古暴君 我要成主宰 丧失人性之时 骈阳纪 亘古谣歌词 望星空是哪一年的歌词 相宾相爱歌词 梧桐树歌词全谱 亘古谣歌词 荷塘月色原版歌词 相宾相爱歌词 重要的是要说三遍歌词 歌词紧捱我手 歌词:我睁眼看到 我渴望 逆战王者歌曲歌词 逆战王者歌曲歌词 歌曲:?莉花歌词 望星空是哪一年的歌词 磐石 磐石 耶稣基督歌词 梧桐树歌词全谱 歌词 开始慢慢着急 歌词紧捱我手 歌词是路人甲乙丙丁 梦太晚完整版歌词 望星空是哪一年的歌词 梦太晚完整版歌词 歌词是路人甲乙丙丁 离骚 歌曲带歌词 歌词红彤彤的大眼 歌曲:?莉花歌词 亘古谣歌词 橙江月风歌词完整版 歌词是路人甲乙丙丁 歌词紧捱我手 梧桐树歌词全谱 闯码头歌词 紫色烟花 歌词里有cola 磐石 磐石 耶稣基督歌词 不会喜欢你歌词 歌词 舍不得的舍得 歌词里有cola 相宾相爱歌词 歌曲:?莉花歌词 仰望的歌词儿 歌词 舍不得的舍得 重要的是要说三遍歌词 咖啡店歌词周杰伦 歌词 开始慢慢着急 悟刘德华歌词下载 闯码头歌词 紫色烟花 逆战王者歌曲歌词 歌词 舍不得的舍得 歌曲:?莉花歌词 ?V月 lrc歌词 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 古村遗梦 斯卡德科技 一百年后的人生 铸神策 天榆大陆 欧博官网 亚星管理平台 澳门葡京游戏官网 皇冠登3出租 亚星游戏官网 歌词是路人甲乙丙丁 咖啡店歌词周杰伦 橙江月风歌词完整版 深海少女歌词lrc 歌词紧捱我手 重要的是要说三遍歌词 青梅当竹马歌词 歌词:我睁眼看到 我渴望 不会喜欢你歌词 亘古谣歌词 歌曲:?莉花歌词 梧桐树歌词全谱 悟刘德华歌词下载 歌曲:?莉花歌词 逆战王者歌曲歌词 离骚 歌曲带歌词 望星空是哪一年的歌词 望星空是哪一年的歌词 仰望的歌词儿 咖啡店歌词周杰伦 歌词:我睁眼看到 我渴望 歌词是路人甲乙丙丁 歌词紧捱我手 橙江月风歌词完整版 ?V月 lrc歌词 歌词里有cola 悟刘德华歌词下载 ?V月 lrc歌词 歌词 开始慢慢着急 ?V月 lrc歌词