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
个人网站设计网站站制做优秀网站制作cms网站甘肃营销型网站制作网络信息安全事件分析深圳全网整合营销网站策划方案网站制作视频教程企业 网络安全 案例及分析网络安全相关会议网络营销的课程网站怎么设置支付昆山网站制作哪家强企业公众号的营销策略网站如何推广网络安全做的好的公司2017年6月份网络安全政府网络安全事件通报提供邢台网站优化昆明建网站要多少钱网络安全公司资质网络安全公司资质淘宝客网站建站网络安全相关会议网站建设创意互联网营销的方式有哪些方面2016口碑营销的例子信息安全配置检查工具,-1成都高端建设网站 人生几何,对酒当歌,道路长远,上下求索。 如果有一天,你不用再去考虑任何东西,只需要去做自己想要做的,那你会想要去做什么? 高骑大马的白衣少侠,手捧书卷的儒袍读书人,端着破碗的褴褛乞丐,身份贵重的华袍官员······ 如果有一天,你突然穿越之后,又发现了自己不会死,你又会想要做什么? 我叫李三四,木子李,不三不四的三四。 从现在开始,我宣布我是最大的,我宣布我是最自由的,我宣布,这个时代······它就叫李三四! 宅男看动漫魂穿狐妖世界,开局签到生活系统…… 介绍无力 感兴趣就来瞧瞧 这是一个道的世界,它无处不在,但没有人能找到它,它规定了一切,让世界能够运转下去,当你去追寻它时,万千大道为你而开。顶级特工失忆,悄然回到故乡; 各国巨头首脑,一夜之间沸腾! “他是可以一人攻破一个国家最高防御的利刃!” “他是医仙王诩的唯一传人,他是医好我不治之症的人!” “他还是我女儿的意中人……” “给我找!不论付出任何代价,一定要找到他!”言钦雅有四张面具,首为狐耳,是对黎明百姓仁慈与怜悯,然愚民不可救,围而攻之,遂出黑龙,怒而屠城;冷静之后,蝶衣覆面,游荡江湖,放逐为自由;奈何红颜为君倾,赠君鸣凰,携妻归庙堂。市委副书记、市长尤施纲开讲:“今天高朋云集绘淇集团,我们西坛市可谓蓬荜生辉。 “我也即兴作一首诗,献给赵红都先生和绘淇集团: “一声龙吟震尘寰, “侠名远播美少年。 “携手英雄创大业, “空活白头当汗颜。”是一个充满在神秘色彩中的反正义跨国杀手组织,故事由一起轰动全国的庞大组织杀人案的曝光引发,反正义和正义与之抗衡。原是普通的城市,一夜间成了凶地,无数都市怪谈出现,无数的人死于非命,而这一切都与一项计划有关...... 当姜月月察觉到哥哥,对她的关爱,突破兄妹之间情意的,是占有的念想。 姜月月会怎样逃离这个“家”。 见千年前的那场旷世大战,将这片大陆的格局重新改变。 几千年的进步,这片大陆步入了现代社会,却依然有人在追寻仙法的本源,最终他们得到了这样的答案。 金、木、水、火、土、风、雷、冰、光、暗、音、以太,十二种已知最直接的元素力量,是仙术?是法术?还是是魔法? 不!在这个世界里,它们就是纯粹的元素,是规则衍生出来的力量。 谁能坚持到最后,谁能更好的使用这种元素之力,谁就能成为这片大陆的传说。
广汉网站 国内外网络安全论坛 信息安全大学排名2017 长沙英文网站建设公司 酒店网络营销概念 网络营销的课程 第十届信息安全会议,-1 厦门网络营销师培训学校 海淀网站建设 网络安全网关 阿克苏网站建设 博客营销法 这样建立自己的网站 网络安全应急服务支撑单位证书 汽车网络营销方案 青岛的网站设计 武汉大学暑期信息安全 长沙英文网站建设公司 青岛制作网站 上海做网站 公司排名 网络安全设备图标 2016信息安全审计发展趋势 网络安全缺陷 茂名网站建设 茂名网站建设 青岛制作网站 可信网站验证 网络营销有关的视频 网站被k 京东的营销渠道设计 2017信息安全服务年会 大学网络信息安全报告 互联网网络安全报告 网络安全信息共享平台 网络安全评审 互联网营销项目宏观环境分析的内容有 长春 建网站 网络营销是企业整体营销战略的一个重要组成部分.( )对错 提供邢台网站优化 网络安全的基本操作