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
网络营销团队要干嘛鞍山网站建设网络营销课的心得体会亚马逊服务营销呼和浩特做网站的公司天津市信息安全服务资质高碑店网站建设信息安全系统不需要 不可抵赖性网络安全局空间营销第四网络安全周信息安全专业认证西安论坛网站制作维护网络营销策划案案例网站建设营销的技巧营销软件网站模板|织梦营销软件网站模板 商务营销助手 非幼儿园网站建设方案结语天津市信息安全服务资质苏州企业网站建地方网站建设怎么个人网站设计网络安全信息保护网站是怎么做的吗扬中网站建设信息安全软件是什么公司网络安全规范重庆微营销商城贾君鹏营销营销工具书2017网络安全峰会2017网络安全论坛福州网站建设服务【修炼铁布衫,获得特效:无敌金身。防御一切伤害】 【修炼天雷刀法,获得特效:三重雷劫。释放雷劫,锁敌攻击】 【和女帝双修,获得特效……】 苏天魂穿万界,获天道特效系统,每修炼一种功法,自带一种特效。 “你的功法举世无敌?没关系,我的功法自带特效。” 我要救的人,地狱不敢留。我要杀的人,天堂不敢收。 莫管前身苦难事,不求后世万古名。 诸天万界谁最狂,唯我苏天第一浪!剑未妥,江湖早,纵使不懂,也不默,少年啊,不归呀,吾辈皆是英雄! 鸟惊忽现白马,飘飘锦衣落梨花,少年呀,归来呀,千年谁复重生?一剑动京华!  李长生一觉醒来,成为了大明王朝菜市口的一名刽子手!   偏逢八百年大明朝妖魔横行,乾坤巨变之时,他发现自己斩杀死刑犯,可以获得各种的奖励!   望气术,养气术,占卜术,替死术,纸人术,敛息术,换脸术,傀儡术,医术,机关术……   上下几万年,漫漫仙道,无数魑魅魍魉一刀斩之,誓护我神州大地永世不衰! 罗修在一场梦中获得了一枚神奇的戒指,戒指中藏着一个魔,噬魂者,自此以后,罗修得噬魂者的帮助,连同雷羽川,和绿色幽灵等各种邪恶的组织进行了一连串的较量陆云是一个偏远地区大家族的子弟,由于出生五灵根被称为废物,好不容易筑基却迎来了人生中第一次转折,家族的叛乱,使自己流亡在外,回来报仇之时,却引发战乱,整个凡界乱作一团……少年被人追杀打入深渊,生死一线之际,少年成功激发了六劫神体,度过第一劫,意外踏上修行之路。 入学府,诀亲情,战诡异,破诅咒,一劫一重天。 手持神剑,背负苍生,剑舞龙蛇,一剑可破山海,一念可动乾坤。 天地依旧在,人非事归尘,茫茫世间无一敌,神主何归去? 在一个喜气洋洋的大年夜,一道身影悄悄离开了这喧闹的街市,来到了一片莽莽榛榛的原野。他靠着一棵枯树坐下。这棵树的枝干早已腐朽,稍有动静便吱吱呀呀地叫个不停,给这寂静的原野添了一种神秘又略带诡异的色彩。   可是,他似乎并不介意。远处,低矮的灌木丛中,闪烁着一点点淡绿的幽光。这一定是那些萤火虫为路人点起的灯吧。   他又抬起头。漆黑的夜空上,挂着几颗明亮的星。当然,也有一些星星是那样的忽明忽暗,飘忽不定。它们,是为了什么呢?   他想着想着,最终仍是累了,倚靠着枯树沉沉地睡去。这时,地面上传来了一阵杂乱的脚步声,越来越近,越来越近,危险,就要来了啊。    懦弱、胆小、霸凌是我经常遇见的,为了改变我努力习武,日复一日年复一年,坚持与毅力共存知行合一。做一件事要认认真真的去完成,你要做到一往无前,不畏艰险打破一切困难! 且看怂包少年偶得系统开启武学之路拳震八方,成就无双威名! 这个人很懒,还没有进行说明!偏僻小城中的少年,不为人,既成神的故事。
水利网络与信息安全体系建设基本技术要求 怎么个人网站设计 信息安全测评中心 待遇 珠海网站推广 扬中网站建设 网络安全名单 门户网站有哪些 蓝海国际版网站建设 网站后台编辑器 app的社会化营销案例 qq群营销是什么 肇东市网站 网络营销思路 网络安全怎么检测 设计网站平台风格 宿迁网站建设 网络安全基础关键技术操作 信息安全属于哪个学院 北京网站制作排名 网络安全备案 怎么个人网站设计 深圳网络信息安全中心招聘 互联网传统营销模式 南通网站 珠海集团网站建设报价 宿迁网站建设 无线网络安全设置wpa 上海高端定制网站公司 怎样才能制做免费网站 3合一网站 甘肃营销型网站制作 珠海网站推广 安徽电信网络与信息安全管理部 网络营销品牌成功案例 网络安全名单 龙岗网站设计效果 上海品牌网站建设公司 网站定制 网络安全备案 搜索引擎营销模式特点