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
论文查重是与什么对比论文查重软件哪个严格论文查重数字论文查重算不算程序论文查重维普的数据库论文查重是与什么对比论文查重哪个知乎论文查重数字论文查重能查框架吗论文查重相似片段太多论文查重文字变图片大小论文查重是与什么对比论文查重修改文字图片大小论文查重文字变图片大小论文查重数字论文查重系统 知乎论文查重哪个最可靠论文查重维普的数据库论文查重维普的数据库论文查重是初稿论文查重能作弊吗论文查重文字变图片论文查重能查框架吗论文查重是0是什么原因论文查重算引用率吗论文查重软件哪个最严论文查重算不算程序论文查重删除论文查重是初稿论文查重修改意见晚点再编在大京国,所有人在十八岁之前,都有三次觉醒的机会,觉醒成功则获得强大的力量,从此踏上修行路! 最终,你会成为什么样的人?在于你的抉择。这是一个崭新的世界,在这个世界没有魔法斗气,只有五彩斑斓的元素充斥着整个世界. 每个人只要到了十岁就可以进行元素修炼,通过自身的感悟和运用进行战斗。 而这本书主要是讲述一个没有元素感知力的少年,是如何一步步称霸一方统领一界的......现代科技盛行的时代,神异力量复苏。 正义与黑暗的抉择,科技与神异者的斗争正式打响。 这个世界谁对谁错,需要新的法则来制衡。 末世纪元,丧尸危机爆发,大地生灵涂炭,人类逐渐走向灭亡……… 而白羽泽却带着死前记忆重回危机爆发前一个月。 “迷茫之中,该何去何从?” 规划、防守、武器订购、受难者基地崛起…… 危机面前,是生,还是死? 历史给予我新生,我必将改写历史! 在此,请见证,新时代的到来………… 宋徽宗时期宣和三年七月上旬,以张叔夜、张伯奋、张仲熊三人为首的三十六部雷将,十八位散仙团灭了梁山!这件事很快传到了天庭,天庭玉皇大帝立刻派观音菩萨从披香殿内释放了新一波的天罡地煞星下界聚义黑牙泊给宋江等一百单八将报仇,而玉帝不放心新一波下界的一百单八将便又派出十二星座战士和十八罗汉将军下界聚义红日山为黑牙泊好汉助阵!最终黑牙泊一百单八将和红日山好汉的配合下团灭了张叔夜一伙雷将,为宋江等一百单八将报了仇雪了恨梦里,叶燃扛着一座监狱满世界抓贼,顺便收了几个小弟,教了几个徒弟,养了几个宠物。 梦醒后,小弟成了诸天大佬,徒弟成了神级宗师,宠物成了超级神兽。 某个游手好闲不学无术的私生子,则一脸懵逼的看着手上的天劫监狱里,关着的一群大魔王…… 这特么的不是梦?! ……陈彬为了完成父母夙愿,考入警校的刑侦专业。 可进入警局实习的前一天晚开始噩梦。 即将发生的凶案细节,全部都会清晰显现于梦中。 跟踪案件,抽丝剥茧,层层拨开,最后竟是一个巨大的阴谋。王浩,小时候被爸妈抛弃,后遇到好心人收留,在他17岁以前,每天都给人打工,直到遇到落叶,而改变他的一生不会种田的乡村少年牛小田,误打误撞拜师老神仙,看相风水医术道法无所不能,从此人生开挂。
全民神明:我信徒是大科学家 裂隙现实 空间魔剑士 亲,快来修仙吧 我平A就是大招 返祖我的先祖是曹孟德 三国之徐振的野望 老虎和美女有趣的玩乐 我在异世开荒种田 金庸醉侠传 随便都能重 满城烟雨尽风华 秋水故居人 网游之屠龙勇士 元宇宙:我从现实挑演员 天庭打工仔 破天机系列之困天迷龙局 光之金字塔一案 逃避世俗带着小丽回宋朝 女侠何在? 论文查重软件哪个最严 论文查重系统 知乎 论文查重哪个最可靠 论文查重维普的数据库 论文查重软件哪个严格 论文查重删除 论文查重那个比较好 论文查重修改文字图片 论文查重软件知乎 论文查重修改文字图片大小 论文查重那个最严 论文查重那个最严 论文查重是0是什么原因 论文查重系统 知乎 论文查重是与什么对比 论文查重算引用率吗 论文查重那个好 论文查重软件哪个最严 论文查重情况说明书 论文查重数字 论文查重问题 论文查重数字 论文查重情况说明书 论文查重文字变图片 论文查重相似片段太多 论文查重是查数字吗 论文查重软件哪个最严 论文查重情况说明书 论文查重能作弊吗 论文查重软件哪个最严 论文查重维普的数据库 论文查重问题 论文查重算不算程序 论文查重是与什么对比 论文查重是0是什么原因 论文查重算引用率吗 论文查重算不算程序 论文查重那个比较好 论文查重是0是什么原因 论文查重数字能查吗 论文查重算引用率吗 论文查重修改文字图片 论文查重是初稿 论文查重那个好 论文查重文字变图片大小 论文查重问题 论文查重那个最严 论文查重算引用率吗 论文查重是查数字吗 论文查重哪个最可靠 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 我只想做个二把手 循环启示录 电影世界历险记之我的猫咪 幕水萧萧浊酒寒 魔灵世界:这个猎魔人好可怕! 亚星游戏官网 万利官网 欧博游戏官网 亚星游戏官网 澳门葡京官网 论文查重是干嘛 论文查重算引用率吗 论文查重哪个最可靠 论文查重情况说明书 论文查重算不算程序 论文查重那个好 论文查重问题 论文查重软件哪个最严 论文查重哪个知乎 论文查重是与什么对比 论文查重是与什么对比 论文查重那个好 论文查重那个好 论文查重修改意见 论文查重软件哪个严格 论文查重能查框架吗 论文查重是干嘛 论文查重是0是什么原因 论文查重文字变图片大小 论文查重能作弊吗 论文查重数字能查吗 论文查重问题 论文查重是干嘛 论文查重哪个知乎 论文查重维普的数据库 论文查重是干嘛 论文查重情况说明书 论文查重那个比较好 论文查重那个好 论文查重修改文字图片大小