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
美国知名电影学院夏洛特烦恼。电影雷人的电影以色列电影制作何以电影版美国知名电影学院王理想演过的电影雷人的电影有一部电影一个女的被玻璃砍掉头有关杀人鲸鱼的电影电影河豚剧照美国知名电影学院娇妻出轨微电影电影河豚剧照雷人的电影有关杀人鲸鱼的电影the cube电影陈乐的微电影十集陈乐的微电影十集2011年悬疑电影电影萨凡纳男女主角电影地震有一部电影一个女的被玻璃砍掉头一部国外电影主角开车误入小镇何以电影版丛林+电影何以电影版一部国外电影主角开车误入小镇2011年悬疑电影农村剧情电影内地刘金行喝酒感慨人生的时候,上天让他回到98年,面对曾经困苦的家庭,他决定为之努力。 还好重生回来,上天给了一个金手指,通过随身空间种田养殖,生活随之改变,生活是一幅悠闲自在的模样,然而他看见了,身边同样困苦的亲朋,他突然明白了,重生也是一件任重而道远的事情。 开服装店,游戏厅等等,之后以随身空间为中心的,商业版图已然展开…… 刘金行想说:重生一回,就要有别样的人生,一定要随风而起。荒古四凶兽,饕餮、穷奇、梼杌、混沌!  荒古四神兽,青龙,白虎,朱雀,玄武! 以及荒古瑞兽麒麟,齐聚龙渊脑海的神台之上。 在它们身后,竟然还拉着一尊神秘的铜棺! 铜棺苏醒,龙渊获得无上传承,开启逆天神藏。 从此,他驾驭九尊荒古巨兽,化身万界之王,踏平无尽神域。 诸天万界,漫天神佛,无不望风而逃,丧胆销魂!我,陈老六,凭三尺青锋,誓要荡尽魑魅,镇守邪祟!林天在机缘巧合之下穿越到上古世界,在这个充满了练体,练气的世界他会有怎样的一番作为呢....... 蜻国与蝉国、蛐国发生战争,弄丢一国之宝即历代女仙眼原,新一代女仙蜻缘心到人界寻眼原,与修仙院中青鸟弟子画中潇结识并相爱。得知他们是同命,性命相互影响。画中潇帮助蜻缘心寻得眼原,但是被蜻国巫师施法陷害,故而缘心嗜杀成性,被世人封杀,至此,画中潇和蜻缘心的缘分被月老在情缘簿上划去,因而他们情缘终结……他,本是一个是一名天才妖孽,却被至亲之人下毒,导致筋脉寸断;但偶然得到星罗棋盘。从此逆天改命;天才,在我面前你算什么?圣女?你是我的人了?四大神兽的祖兽跟我称兄道弟,各个门派的祖师都是我的小弟。你问我是谁?吾乃棋道主宰:陈枫  21世纪的是一个第一次接触魔兽争霸的业余玩家,变身绿皮兽人,掌控兽族大厅。   拥有精湛剑术的剑圣   深受萨尔信任强大的萨满祭司   战场上的他们英勇无畏,总是身先士卒,挥舞着战戟横扫敌军的牛头人酋长   行踪神秘、足智多谋的暗影猎手   何解以族长之名,踏上复兴兽族的征程穷苦修士意外穿越小时候,夺舍已知人物的给予修仙。 “你修仙?还不如种田,老子都是躺平修的。”一个剑侠在大山修炼学徒下山后,开始在江湖行侠仗义!遇到了自己喜欢的女侠,一起行走天涯!在江湖碰到了很多武功高强的剑客,还有各大帮派,最终成为天下第一剑客!十十八年前,他——凌晨降生在了这个世界上,十十八年后,他已有了七大将之首的称号,一次次的外敌入侵,一次次的武功打斗,他能否与其余六将,一同成为武道巅峰
混沌之我不是三千魔神 在古代当反派 末世之逆天崛起 东顷 冰尘决 卡米斯大陆编年史 元宇宙管理局 时空行者之死亡烈风 都市之最强武帝修真者 暮虎识香 雄霸诸界 少爷,别怂! 我用卫生纸拯救世界 重生!我还是六界最强法师 天启之神乱寻道 余烬:文明崛起 寻仙之引 全球轮回之我通晓所有剧情 海贼之大发明家 我绑架了未来女帝 transit+电影 电影老枪吧 the cube电影 陈乐的微电影十集 transit+电影 丛林+电影 炮火最猛烈的电影是哪一部 微电影力战 挪威野玫瑰+电影 娇妻出轨微电影 活力十一+电影 活力十一+电影 一部国外电影主角开车误入小镇 有关杀人鲸鱼的电影 台湾悲情电影 何以电影版 炮火最猛烈的电影是哪一部 挪威野玫瑰+电影 电影萨凡纳男女主角 美国知名电影学院 电影老枪吧 雷人的电影 夏洛特烦恼。电影 电影地震 微电影力战 一部国外电影主角开车误入小镇 挪威野玫瑰+电影 夏洛特烦恼。电影 电影萨凡纳男女主角 挪威野玫瑰+电影 陈乐的微电影十集 电影老枪吧 以色列电影制作 美国知名电影学院 一部国外电影主角开车误入小镇 何以电影版 日本与小男孩拖裤子有关的电影 炮火最猛烈的电影是哪一部 一部国外电影主角开车误入小镇 日本与小男孩拖裤子有关的电影 何以电影版 2015每月电影 2011年悬疑电影 越空行者电影 电影地震 电影老枪吧 活力十一+电影 以色列电影制作 逃跑计划电影免费在线看 王理想演过的电影 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 九霄神帝强者 零神 御天剑仙 魔法世界的修仙者 御临河传奇 AG真人 欧博官网 亚星管理平台 AG真人 皇冠登3出租 挪威野玫瑰+电影 台湾悲情电影 电影萨凡纳男女主角 陈乐的微电影十集 一部国外电影主角开车误入小镇 电影萨凡纳男女主角 娇妻出轨微电影 电影河豚剧照 电影老枪吧 以色列电影制作 何以电影版 雷人的电影 2015每月电影 炮火最猛烈的电影是哪一部 逃跑计划电影免费在线看 以色列电影制作 transit+电影 台湾悲情电影 有一部电影一个女的被玻璃砍掉头 何以电影版 新基山伯爵电影在线看 娇妻出轨微电影 2015每月电影 2011年悬疑电影 台湾悲情电影 丛林+电影 何以电影版 美国知名电影学院 微电影力战 the cube电影