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
信用卡微信还款收费吗微信钱包还信用卡限额平安银行信用卡微信绑定不了中信银行信用卡明细查询谁在微信申请过信用卡信用卡微信还款收费吗平安银行信用卡二维码平安银行信用卡微信绑定不了农行信用卡绑定邮箱建行信用卡分期购车准入条件交通信用卡怎么做分期信用卡微信还款收费吗信用卡分期的好处交通信用卡怎么做分期平安银行信用卡微信绑定不了买车现金加信用卡工商信用卡可以理财吗微信信用卡还款取消谁在微信申请过信用卡微信零钱信用卡还款微信绑定信用卡用途微信信用卡还款取消农行信用卡绑定邮箱微信如何还信用卡招商信用卡无卡取现微信可以绑定信用卡转账吗招商信用卡无卡取现信用卡分期了还能还最低还款额微信零钱信用卡还款微信信用卡怎么解绑公元2500年,随着科学家对宇宙无休止的探索,导致宇宙深处的高级生物察觉到地球的存在,不知何种原因,外星生物对地球进行了大举进攻,导致人类死亡惨重,大战结束后,地球星核爆发出了一种神奇的气体,它能让地球物种体质变强,科学家给这种气体取名为天炁,但不过人类对天炁吸收能力十分有限,科学家因此研发了一种名叫炁芯的纳米芯片,它能让人类吸收天炁的速度加快,并且还能靠此芯片延长人类寿命,但人类科学家并没有为此感到满足,他们再次结合外星物种创造了一种能够拥有外星物种特殊能力的战斗纳米芯片,人类靠着此类战斗芯片,终于战胜外星生物,人类得以苟延残喘,但外星生物并没有停止对人类的进攻,因此地球取消了国家制度,由炁芯战士带头创建一个名为维度联邦的组织来抵御外星生物。这是一个天才辈出的武林盛世,也是一个动荡离乱的战争年代;有立身剑道的痴武之徒,也有慷慨赴死的侠义之士;有血染沙场马革裹尸的热血将士,也有儿女情长义气深重的性情男儿……尔虞我诈的朝廷宫闱,人心险恶的江湖武林,这个时代从来不缺慷慨悲歌的侠客!法外狂徒张三在被执行死刑后无意穿越异能异界,在这个世界张三还能做回那个法外狂徒吗?在这个异能世界,张三又该何去何从?渊辰是男生的名,临渊星辰。深邃,明亮。他是游走于世间的鬼魂,时而有质,时而无质。非人非仙,三界不留。不知何所从来,亦不知何所归去?用心,记下这浮生相遇,探寻生命的起点和终止!以及他背后的真相……怀揣着复仇的决心,凤源走上了一条未知的道路,在黑暗侵袭的各个宇宙,成为了他人的希望,而凤源自己的光又在哪里呢?为生计打拼的年轻小伙彤正,通过重重艰难险阻,终于赢得安身立命的一席之地,并博得熟女青睐。但受不住堕落的诱惑,最终深陷泥潭。他该如何自省自救?皇帝统治末期,国库空虚,军中已三月无饷。商贸日益凋敝,多有囤积垄断之现象。国政松弛,军机各部亦有欠款之举,海政疲惫,几近崩溃。司法沦为铢两悉称,律令之行惟强者是瞻。全国一片凋零,百姓苦不堪言。以平民出身的议员何志明、海军巡洋舰队司令高柏加少将和备受冷落的皇族子女刘丽嘉决定起义,推翻皇帝,建立共和。与此同时,在外流浪多年、高柏加少将的孙子高楠也回国助他们一臂之力。然而革命成功三年后,“洛基之子”与“撒旦骑士团”的到来让新生的共和国摇摇欲坠...不是说报恩最好的方式就是以身相许么?为什么当他想用这种方式报恩时,却被对方嫌弃到不行?是因为自己不够美吗?好,那他就长成一个比倾国倾城的大美女还要美的绝世美人后再来找他,看他还有什么借口拒绝!三岁,亲人就被阴兵抓走,自此妖魔横行,要自我于死地,又被飞僵追杀,道门的背叛。神延大陆中央有一座没有山顶的大山,传说登顶这座山峰的人就算是凡人也能立地成仙。天道峰直指天道,所谓登峰造极登峰便是一条成仙的捷径,亘古至今,成仙者不计其数,但却无一人登上峰顶。天道峰到底通往哪里?仙界?神界?还是永恒? 唐皇国边陲山村小村民郭旬机缘之下得到一颗渡劫成功的天仙内丹,从此踏上不凡之路,为了追求永恒,他踏上了攀登天道峰的道路,成仙成魔尽在一念之间!吾一人踏路,天道路漫漫,怀赤子之心,追寻飘渺永恒,翻千山不停,越万界不止,吾心依然。
天启之路:源落 神探太司懿之明王出世 平平无奇的穿越者日记 江蓠映月 仇杀江湖 最后的人类时代 无极枪圣 人在娘胎:一脚踹飞重生女帝 仁簧 我谈着恋爱也吊打你们 最后一只龙 玄龙剑诀 治愈诸天,我的意难平系统 无双殿 女魔皇 仙鹤大人,爱上我 命运之轮:纷争 赵泰镇南 天地任我行之一 转灵诀 微信可以绑定信用卡转账吗 买车现金加信用卡 浦发银行信用卡 发卡量 谁在微信申请过信用卡 微信钱包还信用卡限额 信用卡分期了还能还最低还款额 浦发银行信用卡 发卡量 交通银行信用卡怎么查额度 信用卡零手续费 信用卡分期的好处 信用卡微信提额度技巧 信用卡微信提额度技巧 微信如何还信用卡 买车现金加信用卡 信用卡微信还款收费吗 招商信用卡无卡取现 民生银行信用卡分期提前还 微信可以绑定信用卡转账吗 交通银行信用卡刷手机 平安银行信用卡微信绑定不了 买车现金加信用卡 平安银行信用卡微信绑定不了 交通银行信用卡刷手机 微信信用卡还款取消 建行信用卡分期购车准入条件 微信红包还信用卡要手续费吗 微信可以绑定信用卡转账吗 交通银行信用卡刷手机 交通银行信用卡刷手机 信用卡零手续费 谁在微信申请过信用卡 交行信用卡积分能干吗 中信银行信用卡明细查询 信用卡微信还款收费吗 微信如何还信用卡 招商信用卡无卡取现 中信银行信用卡明细查询 浦发银行信用卡 发卡量 微信如何还信用卡 平安银行信用卡查询密码 招商信用卡无卡取现 交通银行信用卡怎么查额度 微信零钱信用卡还款 民生银行信用卡分期提前还 交通信用卡怎么做分期 交行信用卡积分能干吗 信用卡微信提额度技巧 招商信用卡无卡取现 微信红包还信用卡要手续费吗 工商信用卡可以理财吗 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 战你!七成把握 穿到自己的小说中逆天改命 逃避世俗带着小丽回宋朝 我的倾城大小姐 我的婆婆我的妈 亚星管理平台 亚星官网 万利游戏官网 亚星管理平台 澳门葡京游戏官网 买车现金加信用卡 信用卡微信还款收费吗 浦发银行信用卡 发卡量 浦发银行信用卡 发卡量 中信银行信用卡明细查询 招商信用卡无卡取现 微信钱包还信用卡需要手续费 买车现金加信用卡 谁在微信申请过信用卡 工商信用卡可以理财吗 微信绑定信用卡用途 平安银行信用卡微信绑定不了 交通信用卡怎么做分期 信用卡微信提额度技巧 中信银行信用卡明细查询 微信可以绑定信用卡转账吗 平安银行信用卡微信绑定不了 信用卡微信还款收费吗 浦发银行信用卡 发卡量 浦发银行信用卡 发卡量 平安银行信用卡查询密码 中信银行信用卡明细查询 微信零钱信用卡还款 信用卡微信还款收费吗 招商信用卡无卡取现 微信信用卡还款取消 交通银行信用卡怎么查额度 微信钱包还信用卡限额 微信零钱信用卡还款 信用卡微信提额度技巧