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
解放初期国企的电视剧电视剧河畔新村观看宠物情缘 电视剧国语19左云电视剧的结局龙珠传奇电视剧星期几更新解放初期国企的电视剧一把青电视剧全集(1宠物情缘 电视剧国语19红处方电视剧好看不离婚后合好的电视剧天地有情电视剧全集75宠物情缘 电视剧国语19隋唐演义电视剧第54集海棠经雨电视剧何何明翰主演的电视剧离婚后合好的电视剧河北卫视晚7 30电视剧芒果瑞互联网电视剧芒果瑞互联网电视剧林更新电视剧主演擒狼电视剧不卡芒果瑞互联网电视剧红处方电视剧好看不离婚前协议电视剧介绍龙珠传奇电视剧星期几更新电视剧十里春风不如她陆毅谍主演海花电视剧离婚前协议电视剧介绍林更新电视剧主演隋唐演义电视剧第54集二十年前,一场大火,父母双亡,与妹妹分离。 二十年后,接到刺杀任务,在战斗过程中,猜测目标是和自己分开了二十多年的妹妹。 因为这个猜测,导致任务失败,受到组织惩罚,“意外”死亡。 重生后,在成长路上,发现了二十年前的那场大火里,还隐藏着不为人知的秘密……一对姐妹一个生而为仙,一个生而为魔,两人被全修仙界追杀,所有人都想要将她们的先天灵气据为己有,在危难之际,她们被迫跳下了陨仙峡,变成两个婴儿落在了一个不知名的山上,被一个人捡到收为了女儿,她们一直以为他只是一个普通人,直到满界魔与仙又一次追杀她们来到这里,他没有逃只是轻轻笑了一声说:“敢打我女儿的主意,看来我已经被世人淡忘了啊!”说罢,一挥手重伤遍天仙魔“打我女儿的主意,天我都给他捅了!”以民间传说及史实为资料,详细介绍了三国鼎立之前的故事,不一样的的三国,尽在《史书三国传》中世界崩坏,风云将起。各方涌动,群雄四起。这个世界怎么了,谁又可终结一切? 侠是一种精神,一种意志,就存在于人的良知中。 一旦唤醒,则能成为无坚不摧的力量,不畏险阻,砥砺前行。一个失去小时候小子,阴差阳错的和小时候帮助的人走到一起 ,是否穷小子能翻身呢?2100年一个武器库保管员,连同武器库一起穿越到了民国时期,从此走上军火大亨的路守川以为他在这个世界只是个过客,修炼这种事也是奔着回到原来世界而去,直到一年后,当穿越的隧道在他面前张开时,守川第一次选择了自己的命运——那就留在这个世界贡献自己的一点能量吧……天之道,损有余而补不足。人之道则不然,损不足以奉有余。 男主顺利步入大学,还沉浸在大学生活之中。可父母却在外的旅行中,一死一失踪,无意间,男主了解到父母的遭遇并不是意外,为了解开事情的真相男主走上了复仇之路……
妖行魅影 星辰侠客 灾季 武纵天途 黑与白正与邪 众神们的日常生活 梦与生活 杀手的小可爱 由懵懂到憧憬 大明极品赘婿 蜂殇 人在末世?被迫造反! 娱乐圈之云上耕耘 超级模拟器,穿越,重生! 掐灭希望 夕阳下的疯狂 修罗斩道 全球观众强迫我修仙证道 焦土幸存者 神级纨绔在都市 离婚后合好的电视剧 离婚前协议电视剧介绍 左云电视剧的结局 电视剧河畔新村观看 离婚后合好的电视剧 狼王子电视剧19 左云电视剧的结局 林更新电视剧主演 陆游 电视剧 偷渡客电视剧温峥嵘 龙珠传奇电视剧星期几更新 龙珠传奇电视剧星期几更新 黄晓明拍过什么电视剧 离婚前协议电视剧介绍 狙击电视剧有哪些好看 电视剧河畔新村观看 陆毅谍主演海花电视剧 陆游 电视剧 天地有情电视剧全集75 郑则仕拍的电视剧 离婚前协议电视剧介绍 红处方电视剧好看不 手机电视剧所有演员表 电视剧十里春风不如她 李进荣演剑侠电视剧 黄晓明拍过什么电视剧 陆游 电视剧 手机电视剧所有演员表 天地有情电视剧全集75 陆游 电视剧 电视剧河畔新村观看 电视剧欲爱全集7 擒狼电视剧不卡 狙击电视剧有哪些好看 隋唐演义电视剧第54集 电视剧河畔新村观看 擒狼电视剧不卡 河北卫视晚7 30电视剧 李进荣演剑侠电视剧 何何明翰主演的电视剧 陆毅谍主演海花电视剧 狼王子电视剧19 偷渡客电视剧温峥嵘 狙击电视剧有哪些好看 海棠经雨电视剧 手机电视剧所有演员表 郑则仕拍的电视剧 陆毅谍主演海花电视剧 李进荣演剑侠电视剧 一把青电视剧全集(1 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 逆斩神明 特殊战士 雨中小故事 原子战神 本元1往事 亚星官网 欧博游戏官网 欧博官网 亚星官网 AG真人 偷渡客电视剧温峥嵘 何何明翰主演的电视剧 手机电视剧所有演员表 何何明翰主演的电视剧 解放初期国企的电视剧 陆毅谍主演海花电视剧 知青题材的电视剧有哪些 电视剧十里春风不如她 电视剧妻的谎言 海棠经雨电视剧 左云电视剧的结局 海棠经雨电视剧 河北卫视晚7 30电视剧 狙击电视剧有哪些好看 海棠经雨电视剧 偷渡客电视剧温峥嵘 狙击电视剧有哪些好看 擒狼电视剧不卡 擒狼电视剧不卡 狼王子电视剧19 离婚后合好的电视剧 电视剧河畔新村观看 何何明翰主演的电视剧 陆毅谍主演海花电视剧 左云电视剧的结局 电视剧欲爱全集7 黄晓明拍过什么电视剧 郑则仕拍的电视剧 离婚前协议电视剧介绍 林更新电视剧主演