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
全自动语音营销机安装互联网信息安全讲座什么是020营销模式维护网络安全我会做到国家信息安全实验信息安全风险评估流程商业网站设计内衣微信营销怎么做网络安全措施媒体网络安全目录生命就是一场经历。没了高中的紧张,大学里放松了很多。 思想上的经历,可以通过多读书来实现。但生活上的经历,只能是自己切身体会。 大学四年,在酒吧兼过职,处了舞蹈系最漂亮的女朋友,球场上跟体育生比过武,跟英语专业最牛逼的男生交了朋友,社团招新上出名全校,也受过其他学生的欺凌,看到过同学生命的逝去,也一直结识更多新的朋友。 小说来源于现实,现实又何尝不是一部小说。方源穿越到异界,发现自己身处牢狱,即将命不久矣。 幸好有着伴随他穿越而来的玄幻模拟器,让方源能够将意识投入到模拟器世界中模拟人生,获得超凡力量。 武道世界、巫师世界、诡异世界、修仙世界... 在无数个画风迥异的模拟世界中,方源意识投射诸界,在诸世界中漫步、横行…… 一列神秘的列车,无限的末日之旅,传说中的奇诡道术,影视剧里才会存在的怪物,无数个位面,无数次末日,惊奇、诡异、神秘、暴乱,谁也不知道列车的目的到底是什么,也不知道是谁发明的列车,他们更不知道自己到底怎么样才能走下列车…秦恒生?害人害己的家伙。   为什么上了年纪的人都喜欢坐在那儿发呆?他!也向往光明。黑暗的尽头那不存在的光明。吊丝青年穿越唐朝当王爷,开始了诸王争霸战。机智权谋比不过太子李建成,文韬武略敌不过秦王李世民,拚杀玩命完败于齐王李元吉。奈何?唯靠一张利嘴,两把刷子,纵横天下,笑傲江湖。数天下英雄,还看我楚王李智云。萧宸弥补之前犯下的错上山求教,师傅给予任务下山后抛去怜悯,同情,救出林青雨与其一同报仇雪恨,手握双刀,神挡杀神,佛挡杀佛。剑去池空一水寒,游人来此凭栏干。世间万事消息尽,只有青山好静观。 叶乘风只是想安安稳稳的在穿越后活下去。但命运却不停逼迫着他前进。逼着他成为人们口中的侠冯宇熙生活在精灵世界,这里有各种神奇的精灵,等你来收服杨涛是一个天才高中生,他能否顺利杀入NBA呢?宇宙因未知原因,总质量大量缺失,导致宇宙持续膨胀时没有足够的物质填充膨胀,迫使这片区域的粒子,甚至连光子都被撕裂成更小的粒子。修复,还是离开......地球,位于猎户支臂上,远离宇宙中心,其上的科学家因为地表的严重核污染和接连不断的战事而无暇抬头仰望天空。国家高层也只关注两件事:科技,战争。科技,为了逃离这颗将绕坠入太阳的行星;战争,为了拥有足够的资源支持科技研发。这间接导致民间的治安管理不再受到重视,全球每年失踪人口瞬间翻了四倍—3000万。而主角也成为这三千万人口中的一员.......没人在意他在哪里,除了他自己。丁锋,被一个快递送到了未知星系,这也算是失踪案件里挺奇葩的了。为了回家,他不得不踏上了冒险的旅程,强化自己。旅程中,丁峰发现好像有什么东西在所谓的真相身后挣扎着,核污染,地球坠日,真的是这样吗?好像一直有一只手拨动宇宙的琴弦,演奏着早已谱写好的序章......
湛江网站设计 滨州建网站 营销扣扣是什么意思 太原网站改版 信息安全屏保,-1 网络安全要从供应链抓起 成都网站设计 2017网络安全竞赛 网络安全数据集 网络安全攻防培训 南邮信息安全实验室环境网络攻防实验实验报告 广告营销优缺点 网络营销的介绍 广东信息安全 上海市网络安全周 2014网络信息安全 网络安全目录 网络营销事业部 湛江网站设计 商业网站设计 上海营销公司有哪些内容 全自动语音营销机安装 网络安全思想文章 深圳信息安全测评中心,-1 网络安全监控软件 传统企业网络营销意义 好的互联网资讯网站 常州制作网站价格 营销书 邮件营销推广是什么 利用互联网营销的例子 020网站系统网站设置好了关键词怎么样在搜索引擎里搜索关键词就能有排名 免费网站制作新闻 网站搭建价格 什么是020营销模式 郑州上市企业网站建设 吉安网站 网络安全员培训 网络安全要从供应链抓起 传统营销的价值h5经典营销案例 网络营销的介绍 国家信息安全工程研究中心有限公司 太原网站改版 静安微信手机网站制作 网络安全组组织 广东信息安全 南邮信息安全实验室环境网络攻防实验实验报告 大学网络安全先学什么 信息安全工具排名 网络安全法 互联网 广告营销优缺点 做网站教程 江苏网站建设效果 上海十大互联网营销 网络营销的介绍 太原推广型网站制作 2014网络信息安全 网络安全检测工具 广东信息安全 seo网站系统 中国信息安全测试中心 网络营销实训课程设计 成都网站设计 2011年中国互联网网络安全态势报告 古典网站建设 计算机网络安全讲座 最流行的网站设计风格 2017 网络安全 断网 信息安全检查 方案 维护网络安全我会做到 建设手机网站包括哪些费用吗 信息安全检查 方案 网络营销实训课程设计 安康网站建设 网络营销事业部 全网营销系统 网站设计佛山顺德 信息安全范围 湛江网站设计 邮件营销行业 滨州建网站 网站费用单 商业网站设计 南昌寻南昌网站设计 布吉网站建设 定制型网站建设平台 上海营销公司有哪些内容 很有风格的网站有哪些 上海运营营销号大公司信息安全管理实验报告 信息安全官 信息安全范围 国家信息网络安全中心 郑州上市企业网站建设 国家信息安全实验 网络安全思想文章 网络安全威胁中断 2017 网络安全 断网 做网站要多少钱 深圳信息安全测评中心,-1 网络安全思想文章 网络营销项目经验 广告营销优缺点 信息安全专业学生需着重分析当前的信息安全面临的主要威胁及相应对策 网络营销项目经验 作网站 深圳市计算信息网络安全员 信息安全 行业 2015 传统企业网络营销意义 计算机网络安全讲座 病毒性营销视频 网络安全保险是什么意思 计算机网络安全服务包括 常德网站建设 嵌入式系统信息安全央企网络安全大会意义 珠海网站设计 2017年网络安全会议中山专业网站制作 中国国家信息安全中心 建网站怎么上线 安康网站建设 国内信息安全现状分析 营销书 学互联网营销会后悔吗 b2b网络营销服务有哪些 邮箱营销系统哪个好 国家信息安全工程研究中心有限公司 邮件营销推广是什么 自己创造网站平台 信息安全 顶尖会议期刊 聚美优品口碑营销 网络安全数据集 利用互联网营销的例子 自己创造网站平台 深圳网站建设迅美 滨州建网站 销售与营销 深圳网站建设迅美 营销扣扣是什么意思 中科大信息安全实验室 根据国家网络安全 作网站 上海口碑营销公司 营销网站与传统网站的区别 2015网络安全趋势 信息安全竞赛强队 国际网络安全法