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
商丘做网站哪家好南通网站公司网站开发公司中卫网站建设山科信息安全怎么样社会化营销案例库app装饰公司网站建站网络信息安全审查叫兽学院网络安全随身碟密码email营销的一般过程“诶诶诶!你不要过来啊!你不要抱着我啊!” “主人,你的身上好香啊~”盼天盼地终于盼来了属于我的系统,可是这系统看着......怎么好像不太对劲。穿越了,但也快死了。 没办法只能当个骗子,骗骗人活命而已。 修练了,但也怕无聊啊。 没办法,只能气气人找人当工具人段练体质,顺带升下级而已!人生在世并不是得到与得不到,大千世界,芸芸众生,冥冥中有些活在我们身边的人就是上帝派到人间的使者,请努力珍惜眼前的一切。叶峰穿越到特种兵世界,因为是关系户不受待见,被派去当垃圾新兵连队的连长! 仅用三个月时间,就将这垃圾连队打造成了堪比特种部队的特战连! 团长:让你随便练练这些新兵,特么你全给我练成特种兵了? 狼牙:到底谁才是特种部队啊? 范天雷:求求你带着你的兵全部加入我狼牙吧! 何晨光:这辈子我墙都不服,就服叶教官! 冷锋:我才不加入战狼,我要降级去叶峰的野战部队! 从铁拳团新兵连开始,叶峰打造一支又一支可怕的幽灵部队,名扬全军。 传奇,从此开始!凄冷的圆月下,寥寥孤魂在一望无际的大陆上游荡。天边,时而有憾人心弦鸟鸣。虚幻的夜晚,不知还有谁彻夜未眠。 西北荒漠、大沼泽、海与腐灼之地,世界究竟有多大? 似乎是亘古不变的,御魔界像风烛残年的老人,苟延残喘着。 从何时起,分为三域的御魔界迎来了新生,接着又是灭亡。一次次的破碎中,罗盘十二境在混沌里缓缓旋转。 谁知道,明天,又是什么样...... 在苏城医院最近传来了件件诡异的事件,听陈峰的哥们孟庆华讲,在苏城医院里有位叫张天楚的医生回来了,据说他已经去世两三年了的。可是,确实出现在了医院里,自从他出现在医院后,就发生了种种诡异的事件,病人的失踪,红色旗袍的女子,医院阅览室等等。孟庆华推荐陈峰探长给张明生院长,让陈峰潜入医院内部进一步的调查,张院长同意了孟庆华的推荐。于是,陈峰潜入了医院内部,开始了更加艰难的调查之中......这是一个禁忌的世界,这是一个被诅咒的世界。 谁晓岁月蹉跎过,那年他乡梦回头。 一把传承的剑,改变的不只是少年的命运, 还有大陆的未来。 一剑生死两茫茫,纵横九载又八荒! 传奇之所以是传奇,因为它永垂不朽。 我将用这把剑,去开创一个属于芸芸众生的无限伟岸! 吾名,李星陨!这一剑,可陨星! 既然这个世界公平正义无法得到伸张, 那我将拿起正义的长剑,代表法官, 挥向这世间的邪恶。 寒原,冰封千里,生存灭亡,命悬一线。 在这里,没有诗与歌,当然也没有所谓理想。 然而,就这样,隗姜与姬鸿,两大部落,涿泉与明渊,命运般的邂逅,创造这样一场,岚山内,寻找所谓梦之物。月高悬于空,星不见其影。 沉眠的暴君从历史中苏醒,漆黑的双翼划过破晓的黎明;巍峨古堡跨越了尘封的的记忆,矗立在洛尔维亚的群山之巅。 当头戴王冠的公主睁开双眼,从死亡归来的旅人重新握住剑柄—— 国王湖的水面不再平静,却依旧深不见底。王浩穿越到了修仙世界,成为了一名朝廷追杀的匪二代。 好在他觉醒了命运模拟器。 亿万次的模拟,只为主宰命运,寻找绝境中的一线生机,逆天改命。
信息安全标准 网络安全相关文章 王老吉网络营销方法 关于加强政府及重要信息系统网站网络安全管理 网络安全和java工资 台湾网站建设 网站的构造邮箱营销软件哪个好用 公司网站开发公司 广西网络安全技术大赛 企业员工信息安全培训 公安部信息安全保密法 网站方案 山东网络安全大赛报名 网络安全法对央行履职 网络安全 ppt 2017 网络安全体系建设方案 相关搜索网络整合营销 相关搜索网络整合营销 网站制作公司 网站的构造邮箱营销软件哪个好用 深圳市珠宝网站建设 无线网络安全网关 网站稳定性 事件营销的成功要素网络安全综合解决方案 公司网站开发公司 移动公司信息安全培训 信息安全竞赛入门 2017年网络信息安全 网络安全展牌 专业信息安全服务资质证书,-1 网站建设有模板吗 王老吉网络营销方法 杀软 网络安全 建微网站 山东网络安全大赛报名 装饰公司网站建站 网络安全 僵尸网站 怎么看待网络安全 3合一网站 事件营销的成功要素网络安全综合解决方案 企业员工信息安全培训 企业网站程序 事件营销的成功要素网络安全综合解决方案 网络安全促进委员会 网络安全法 断网 网站建设有模板吗 网络信息安全技能大赛 移动公司信息安全培训 达内学网络营销 网络安全怎么检测 无线网络安全网关 国家推荐网络安全 网站注册器 无限动力网站 网站建设常州 2015年网络安全厂家 广西网络安全技术大赛 湖南营销网站建设 云南营销策划培训 网络安全 僵尸网站 天津网站建设怎么样 山西网络安全测评公司 北京安天网络安全技术有限公司 网络营销的缺点 铜川网站建设 问答营销好处 南通网站 精品课程网站设计 山西网络安全测评公司 网络安全百强 微网站建设包括哪些方面 网络安全和java工资 深圳网站外包 达内学网络营销 社会化营销案例库app 珠海网站推广 专业信息安全服务资质证书,-1 山东网络安全大赛报名 公安部信息安全保密法 新网络安全专题 南通网站制作外包 网站名注册 网站制作的趋势 山科信息安全怎么样 网络安全应急服务支撑单位 国家级 王老吉网络营销方法 网路营销 公司网络安全规范 网络安全怎么检测 课程商城网站模板 网络安全 ppt 2017 天津网站建设怎么样 网络整合营销推广 中国平安信息安全 网络信息安全 规范,-1 2011 网络安全 事件 杭电信息安全 扬州网站建设石家庄网站建站推广 网站济南网站建设 营销是什么意思 中国平安信息安全 网站方案 网络营销产品定价 北京安天网络安全技术有限公司 网络安全展牌 云流网络安全吗 国家推荐网络安全 网站的构造邮箱营销软件哪个好用 牛掰网络营销资讯 信息安全服务资质安全工程 池州网站建设 北京邮电信息安全 移动公司信息安全培训 网站公司 内容营销优势 相关搜索网络整合营销 招聘 信息安全,-1 网络信息安全口令攻击 网络安全体系建设方案 信息安全等级保护评估 网站名注册 企业员工信息安全培训 互联网信息安全 政策套b网站 网络整合营销推广 免费足网站 杀软 网络安全 商丘做网站哪家好 做网站百度 进行公司网站建设方案 企业宣传网站建设 微博营销百度百科 营销团购 营销是什么意思 医院信息安全方案 信息安全峰会是什么 网站建设成都公司 基于html5设计的网站建设 网络安全 可用性 郑州网站制作电话 利用qq群做营销的缺点 怎么看待网络安全 信息安全竞赛入门 网络安全软考 南通网站制作外包 新网络安全专题