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
超美小孩欧美头像男生擦口红大图头像超美小孩欧美头像男生拿滑板的男生头像长头发女孩头像图片社会哥头像带砍刀微信头像礼服男抽象悲伤地背影漫画头像紫色唯美男生头像二次元背影头像女张辽动漫图头像超美小孩欧美头像男生韩系中分短发女生头像五人头像字图悲伤地背影漫画头像二次元背影头像女王者荣耀头像男生唯美赵丽颖与杨颖头像一张赵丽颖与杨颖头像一张个性网最酷情侣头像动漫图片欧美霸气西装男头像赵丽颖与杨颖头像一张紫色唯美男生头像百度霸气的网名头像长头发女孩头像图片龙猫手绘头像拿滑板的男生头像百度霸气的网名头像个性网最酷情侣头像动漫图片韩系中分短发女生头像【神秘身份+民间奇术+历史穿越+异闻志怪】大学毕业前的一个神秘包裹,改变了商文渊的生活。重拾汉帝钦封苍狼典客身份,镇守古丝路诸国气运,却遭中原宗门排挤。从此,你传你的的万民教化,我护我的黎庶安危。承袭阴阳镖局,邂逅千载军魂,解密奇诡邪术,隐遁历史时空。鄯善苍狼,折枪送君。阿维斯塔,真本何在。蜀身毒道,黑白佛牙。西域黄沙下,究竟埋葬了多少历史的隐秘。三百世轮回中,我在哪一世,你又在哪一世。有诗云:神枪且无柄,作剑可堪行。莫犯神州土,丝路有奇兵。西行十万里,黄沙送归途,典客阵前时,莫问阴阳路。永安不安!白焰不白!一团苟延残喘的青焰,一个没落门派的弟子,一段埋葬在时间长河的秘史,千年的和平似乎让人们忘记了曾经的威胁,在这诸天星海,万界之族中,苦而弥坚的人族、据高临下的妖族、作壁上观的神族以及……在这万类霜天竞自由中,谁为棋子?谁为棋手?风都一个出现了英雄的城市,在假面骑士W打败了最后一位掺杂体后风都又回归了平静。但事情并没有结束。十年后发现的一个遗迹打破了这一静。那是来自黑暗世界的力量,将人们吞噬的力量,将世界笼罩的力量,这一切会由谁来打破呢?是英雄回归?还是光明乍现?等待人们的是臣服黑暗还是奇迹的发生?公元前228年秦军兵临易水,燕国告急,燕太子丹召开武林大会,推选刺秦使者。身为刺秦使者的秦天雨得妻子皓月公主劝导,为了天下一统大和,转身变成护秦人,致使荆轲刺秦失败,自己也招来杀身之祸。燕二公子为制造混乱,散布谣言,致使秦王政要诛杀六国贵族的三千后裔,徐福为救三千孩童,谎称海外寻访仙丹带领三千孩童东渡。秦天雨之子秦风逃到东胡,秉承父志维护和平,揭发了东胡人制造匈奴与大秦战争的诡计,秦风逃避东胡人追杀,也逃到了东瀛,得遇鬼谷子,学得上乘武功,又重遇亲弟。兄弟二人重回中原报父仇,除奸恶,东瀛人来中原本意是帮秦风报大仇,却贪恋中原大好河山,趁楚汉相争之际侵略中原,秦风如何罢止楚汉内战,一致对外。力拔山盖,不可一世的项羽又为何败给了刘邦,项羽为何不划江而治,秦风为何不一统天下,成为天下共主,而宁愿选择隐居世外桃源…在古老的初生之地,混乱与纷争是永恒的主题,林玖自绝望与光明中降生,一路追寻预言的召唤,血脉深处的呐喊,则昭示其注定成为传奇。为了男人的承诺,萧晨强势回归,化身美女总裁的贴身保镖,横扫八方之敌,谱写王者传奇!   他——   登巅峰,掌生死,醒掌天下权,醉卧美人膝! —————— 小舞的微信公众号:寂mo的舞者,可以去关注哦! 小舞的QQ:1589045849,可以去加好友! 唯舞独尊①群:545765633!   历史上的唐朝,一个经历了繁荣与没落的王朝,大起大落中江湖里围绕着洛阳城里林府的三位姑娘又发生了哪些快意恩仇的事件让人感慨人生。这是一个山海缘结,仙魔逆变的故事。 被迫遗落在尘世间的孩子,带着凡俗的认知,羁绊与名字,一步步走向修道巅峰。 他要带着红尘的枷锁,肩负着众生的希望,直面诸天仙佛。 人不为己,天诛地灭。刘洋穿越到汉灵帝私生子刘讼身上!携带系统的他剑锋所指所向披靡!镇物,也叫镇邪之物。在民间,镇物用于镇墓、镇宅等。 镇物用得好可以救人,而被心术不正的人利用,也能杀人于无形。
万道帝仙 大道界墟 本公子讲歪道理,你讲什么 最上是魔 九龙圣祖 剑道师的传说 一剑长空 天残补命录 一只骷髅的科研进化路 灵之摆渡 我变成了鬼! 天下八荒 龙吟五洲 离婚后,我捧红了文娱天后 大秦:朕都皇帝了,你让我造反? 4号 北风之神 江湖锦衣卫 苍隙界 你好,时间 一个姓水一句话头像 高冷忧伤的头像女生头像 王者荣耀头像男生唯美 赵丽颖与杨颖头像一张 一个姓水一句话头像 王者里李白的动漫头像 彩绘少年头像 找个男人的头像 龙猫手绘头像 韩系中分短发女生头像 紫色唯美男生头像 可爱的动漫女生黑猫头像 qq头像 男小孩可爱图片 高冷忧伤的头像女生头像 社会哥头像带砍刀 长头发女孩头像图片 彩绘少年头像 龙猫手绘头像 欧美霸气西装男头像 超美小孩欧美头像男生 高冷忧伤的头像女生头像 悲伤地背影漫画头像 擦口红大图头像 五人头像字图 二次元背影头像女 qq头像 男小孩可爱图片 龙猫手绘头像 擦口红大图头像 欧美霸气西装男头像 龙猫手绘头像 长头发女孩头像图片 高冷忧伤的头像女生头像 带滑板的头像男士 超美小孩欧美头像男生 百度霸气的网名头像 长头发女孩头像图片 带滑板的头像男士 王者荣耀头像男生唯美 qq头像 男小孩可爱图片 悲伤地背影漫画头像 拿滑板的男生头像 原谅微信头像 头像我的世界男 可爱的动漫女生黑猫头像 五人头像字图 高冷忧伤的头像女生头像 可爱的动漫女生黑猫头像 拿滑板的男生头像 个性网最酷情侣头像动漫图片 微信头像礼服男抽象 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 神域彼岸 诡异复苏之阴曹重建计划 网游之我能无限召唤英雄 玄幻:我能看见机缘线 高田寨传纪 百家乐官网 澳门葡京官网 葡京官网 百家乐官网 万利游戏官网 微信头像礼服男抽象 欧美霸气西装男头像 原谅微信头像 qq头像 男小孩可爱图片 可爱的动漫女生黑猫头像 拿滑板的男生头像 拿滑板的男生头像 欧美霸气西装男头像 擦口红大图头像 彩绘少年头像 百度霸气的网名头像 一个姓水一句话头像 带滑板的头像男士 张辽动漫图头像 紫色唯美男生头像 王者里李白的动漫头像 赵丽颖与杨颖头像一张 欧美霸气西装男头像 找个男人的头像 可爱的动漫女生黑猫头像 彩绘少年头像 拿滑板的男生头像 带滑板的头像男士 q版人物萌图男头像帅气 欧美霸气西装男头像 王者荣耀头像男生唯美 可爱的动漫女生黑猫头像 擦口红大图头像 龙猫手绘头像 头像我的世界男