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
中国信息安全风险超炫的网站国家 信息安全规划深圳网站建设公司电话互联网营销工具有哪些内容上海培训网络营销邢台网站制作有哪些网络营销的作用和职能2016年429网络安全黄岛建网站映客 营销产品营销免费网络营销案件分析北京信息安全实训电商营销课程培训课程淘宝营销策略是什么杜蕾斯微博营销团队网络安全 pdf扁平化设计网站网络安全ac产品营销免费零基础学习网络安全营销供方信息安全资质有效期淘宝营销策略是什么信息安全应用技术,-1网络安全渗透技术培训班20152016网络安全大事记台州建设网站珠海企业网站建设费用29岁的天岚,事业无成,刚刚朋友也和自己分手,独自一人走在熟悉的街道上,往事历历在目,也许终究是自己错了,但你们却也不该这样对我······ 如果能够回到过去,我想我一定······一位现代年轻人,刚刚考上国内有名的大学,却被告知换来绝症晚期。在临时的夜晚电闪雷鸣,穿越了,穿越到玄武大陆,玄武大陆是一个以实力唯尊的修仙世界。 现代都市和平生活并未持续多久。当平行的世界被人们挖掘到信息,位面重叠,世界重启。这里变成了修行者的世界。无尽的尸海,广阔的荒漠,万族林立,百家争霸,无情的杀戮将一切虚幻斩断,而何处才是人类栖息之地?穿越到天龙世界的屌丝,凭着对原著小说的耳详能熟,是选择修炼成绝世高手还是辅助原著主角成就霸业?不,武功要练,最重要的是篡改剧情,别让乔峰自杀…在封建王朝翻云覆雨的伟大人物,竟是一个名不见经传的小卒。一场灾变,让世界沦为秩序崩坏的废土。 有人栖身要塞,有人躲在荒原,还有人在辐射中变成了另外一种生物。 世界分割为两个极端,权贵们掌握着顶尖的科技,用一座座拔地而起的要塞将自己隔绝在乱世之外。 易子而食,危机四伏的流民区内,一名迫于生计的猎人,为了度过即将到来的凛冬,走向了一条披荆斩棘的道路。 在这艰险混乱的世道当中,一群草根出身的生死兄弟,逐渐让世界为之颤抖。万丈高楼平地起,辉煌只能靠自己! 社会很单纯,复杂的是人! 穿越后的秦凌云只想做个躺平的富二代,赚点小钱,过过以前没过过的生活! 结果被迫营业,一不小心被皇帝弄进朝堂,混成了前世的打工仔模样! 不一样的穿越之旅,一样的家国情怀。天高海阔八万丈,芸芸众生尽匍匐。那立于天地之间,受缚于轮回万物,他们或求来世,或修今生,参禅悟道,以求不受生死束缚,轮回之困。然福兮祸兮,世事难料;贪嗔痴妄,皆为本性;人鬼妖幻,亦正亦邪……人在江湖,正如一叶浮萍飘摇于风雨之中。这是一段有着纪实性质的故事,可能会很长,写本文的目的绝不是怂恿年轻人去闯江湖混社会,而是想通过一些江湖中人的故事,让更多人了解从九十年代至今,整个东北随着时代的发展,社会和人情的变迁,希望各位尊敬的读者,通过的阅读本文除了可以了解一段段精彩的江湖故事外,还能让诸位在面对人生重要的抉择时,能有一些启发和参考价值,感谢各位。春雨一夕了无痕,如这雨一般,我是谁,去往何处。看陆雨在寻找自己的过程中,怎样诛灭神魔。
外贸网站设计制作 亚马逊网络营销现状 网络信息安全概述 网络营销的作用和职能 网络安全与应急管理 网站域名组成 网络营销信息源有 网络安全 pdf 北京市网络安全检测 网络安全法 网信办 rsa 信息安全大会 宿迁做网站 产能足 饥饿营销 淘宝营销策略是什么 上海门户网站建设 营销方案网 网络安全就业培训学校 无锡网站优化 淘宝营销策略是什么 动易pe2006网站网页可以访问但后台进不去也没有提示 网站开发工具选择 南山的网站建设公司 深圳信息安全公司排名 青岛网站建设迅优网站设计公司北京 信息安全防火墙标准 超炫的网站 关于检查网络安全的app 商务网站建设公司 黄岛建网站 途牛网营销模式分析 信息安全应用技术,-1 南京网站制作 网站banner图怎么设计 gartner 信息安全市场,-1 巩义网站建设 商务网站建设公司 信息安全资质有效期 第三方营销平台的发展趋势 信息安全 安全维保 唯品会营销理念