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 as part of Bootstrap is a 940px-wide, 12-column grid.

It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.

<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

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="span12">
    Level 1 of column
    <div class="row">
      <div class="span6">Level 2</div>
      <div class="span6">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>
Variable Default value Description
@gridColumns 12 Number of columns
@gridColumnWidth 60px Width of each column
@gridGutterWidth 20px Negative space between columns
@siteWidth Computed sum of all columns and gutters Counts number of columns and gutters to set width of the .container-fixed() mixin

Variables in LESS

Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.

How to customize

Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.

Staying responsive

Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.

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>

Responsive devices

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: 768px) { ... }
// Portrait tablet to landscape and desktop
@media (min-width: 768px) and (max-width: 980px) { ... }
// 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 hidding 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

Test case

Resize your browser or load on different devices to test the above clases.

Visible on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop

Hidden on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop
网络安全系统开发公司高校 网络安全 研讨会2015年网络安全预测北京做网站的公司微信的网络营销推广信息安全 应急响应安全报道与网络安全计划方案企业网络营销的缺点中央网络安全 管理互联网个人网站制作他离开后,天地受异族侵略,万千宗族刹那间变成灰烬。受天地所赐拥有十八神体的少年主动挑起了大梁,战至四肢尽灭,战至万里血浆! 只为诸君战四方,莫言人族无人皇!杀!功成名就的李向东走上人生巅峰,可是大梦初醒,却被一脚揣回了90年代变成了一个人人嫌弃的烂赌鬼,不但输掉了家产,竟然连女儿都输掉了。 重活一回,赚钱都是小意思。 李向东不仅要登上财富巅峰,更要让妻女俩过上梦寐以求的好日子。无数的故事,编织成了这个世界。  穿越洪荒,成为人皇燧人氏!   【叮!你获得万界聊天群邀请!】   【叮!鸿蒙火种系统激活,获得亿万倍增幅!】   以燧人氏之位格,分封人族火种,获得神火加持之人,获得修行速度十倍至亿万倍增幅!   以功德神火献祭,献祭物品品质亿万倍增幅!   被分封者献祭之时,获得亿万倍增幅!   祖龙:“燧皇,朕想要修仙!”   【嬴政向你献祭三千精兵,触发亿万倍增幅,你获得三千太乙金仙!】   聚万界之神物,培育洪荒人族。   养万界之英才,反攻巫妖二族!   巫妖大战开启之日,万界人族揭竿而起,反攻洪荒,人族君临诸天!【神秘身份+民间奇术+历史穿越+异闻志怪】大学毕业前的一个神秘包裹,改变了商文渊的生活。重拾汉帝钦封苍狼典客身份,镇守古丝路诸国气运,却遭中原宗门排挤。从此,你传你的的万民教化,我护我的黎庶安危。承袭阴阳镖局,邂逅千载军魂,解密奇诡邪术,隐遁历史时空。鄯善苍狼,折枪送君。阿维斯塔,真本何在。蜀身毒道,黑白佛牙。西域黄沙下,究竟埋葬了多少历史的隐秘。三百世轮回中,我在哪一世,你又在哪一世。有诗云:神枪且无柄,作剑可堪行。莫犯神州土,丝路有奇兵。西行十万里,黄沙送归途,典客阵前时,莫问阴阳路。杨羽穿越玄幻世界,面对狗男女欺压,生命危在旦夕时,开启狂暴吞噬系统。 系统开启,一切皆可吞! 从此天地色变,唯我吞天魔祖!都市的霓虹,血色的江湖。我的江湖,我来了。我带着大妖混江湖。该书讲的是一个社会主义国家,卡瑞特,卡瑞特这个国家为了发展经济,通过提案恢复了私有制企业,但国家并没有及时的去抑制私有企业的发展,使得国家贪污腐败过于严重,让平民受到了压迫,我们的主人公阿布司曼和一系列出现的平民,通过他们的经历让我们看到了他们悲惨的命运魂穿崇祯却发现自带华夏图书馆,整顿吏治,训练新军,平内安外,科技强国第一步先从留住魏忠贤开始。 东林意图众正盈朝?可曾问过厂卫刀还利否? 鞑子于辽东意图糜烂中原?可曾听闻枪与火炮轰鸣? 东瀛时常滋扰海防?与其日日提防不如给大明添座石见银山? 知识改变世界,放牧北美,开矿澳洲,殖民印度,脚踩东欧。 枪炮铸我铁血大明,科技铸我宏图盛世。 朱由检:海内诸国,皆为臣属,有明一朝,日月不落。这是一个混乱的世道,看一对小乞丐怎么逆袭,成为一方霸主!!!
车联网信息安全标准 服务类做网络营销 树莓派做信息安全 网络新闻营销推广代理 网络信息安全专业课程 黑客风云vip教程 信息安全渗透测试课程 实行信息安全等级保护 工信部信息安全认证中心 武汉本土互联网站南京网站建设公司 中国信息安全网络协会 前世老婆的前世缘分咨询【www.richdady.cn】 前世今生的轮回理论咨询【www.richdady.cn】 暗恋的情感表达咨询【www.richdady.cn】 家宅磁场的优化技巧【www.richdady.cn】 为什么过世的心理调适咨询【www.richdady.cn】 长期头脑混沌可能是哪些疾病的前兆咨询【企鹅383550880】√转ihbwel 存不住钱的环境影响【www.richdady.cn】√转ihbwel 心慌胸闷头晕的自我提升【σσЗ8З55О88О√转ihbwel 缺心眼的自我提升【企鹅383550880】√转ihbwel 前世今生的因果关系【www.richdady.cn】√转ihbwel 精神不振的原因分析咨询【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 公司破产的咨询技巧【企鹅383550880】√转ihbwel 老公家暴的心理调适咨询【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 升迁障碍的原因有哪些?咨询【www.richdady.cn】√转ihbwel 冤亲债主干扰的根源是什么?【微:qq383550880 】√转ihbwel 孩子压力大的原因分析咨询【企鹅383550880】√转ihbwel 前世缘份的故事有哪些真实经历?咨询【微:qq383550880 】√转ihbwel 婚姻生活不顺的原因分析咨询威:⒊⒏⒊⒌⒌O⒏⒏O√转ihbwel 婴灵的化解方法威:⒊⒏⒊⒌⒌O⒏⒏O√转ihbwel 缺心眼的环境影响咨询威:⒊⒏⒊⒌⒌O⒏⒏O√转ihbwel 公司信息安全工作建议和意见,-1 高校 网络安全 研讨会 制作一个营销型网站 营销活动公司 重庆 服务类做网络营销 北京信息安全的公司 动态网站制作 资阳网站建设 网络营销与物流 网络安全事件2017 雄安网络营销外包 银行业网络安全法如何用代码设计一个网站有前台和后台一般用什么语言设计网站 网络营销能力秀软文 微信点对点精准营销 好未来信息安全规范正式实施时间 中国网络安全平台作业 成都网络信息安全协会 公安内网网络安全工作 资阳网站建设 宁波网站建设公司 广州网络营销外包 合山市网站 四川省网络安全法 网站首页面设计 网络安全事件2017 创新的商城网站建设 四川省网络安全法 个人网站制作 广东南方信息安全产业基地有限公司 数据安全保护系统 破解 中国培养 信息安全 网络安全方面的人才 培育效果 培养机制 银行业网络安全法如何用代码设计一个网站有前台和后台一般用什么语言设计网站 网络信息安全专业课程 网站营销网 网络安全事件记录表 网络营销理念包含哪些内容 微信营销成功的企业 苏州 网站制作公司 中国信息安全公司 网络营销中手机网站建设 的作用 国家信息安全部门 企业网络安全实现的方案 银行业网络安全法如何用代码设计一个网站有前台和后台一般用什么语言设计网站 龙岗网站建 展示网站和营销网站的区别 网络信息安全专业课程 房产类网站制作商 杭州制作公司网站亳州网站建设 信息安全等级防护 什么是工业控制网络安全 广东南方信息安全产业基地有限公司 数据安全保护系统 破解 网络信息安全与防范技术 网络安全 监控 关键词 营销推广思路 网络营销案例评析 工信部信息安全认证中心 设计网站首页多少钱 快速网络营销软件 刘山泉 信息安全 中国信息安全网络协会 公安内网网络安全工作 银川制作网站 制作一个营销型网站 网络安全错误 信息安全等级防护 广州网络营销外包 进行公司网站建设方案 网络安全讲竞赛 讲话 南宁网站建设7make 转换营销 网络营销中手机网站建设 的作用 广东做网站 airbnb的营销策略 信息安全测评工作流程 高校 网络安全 研讨会 上海科技 信息安全有限公司,-1 车联网信息安全标准 资阳网站建设 在线营销策略 信息安全等级防护 2014重大信息安全事件,-1 airbnb的营销策略 合山市网站 国家信息安全部门 网络安全技术分享网站 快速网络营销软件 网络安全顶级会议 防火墙在网络安全中所起的作用 网站维护公司 网络营销与物流 车联网信息安全标准 银川制作网站 房产类网站制作商 单仁网络营销 网站营销网 为什么网站生成后不显示 网络营销案例评析 有经验的佛山网站建设 网络安全技术分享网站 转换营销 网络安全评估机构 在线营销策略 网络营销能力秀软文 互联网与信息安全,-1 什么是工业控制网络安全 动态网站制作 转换营销 创一家网站 制作一个营销型网站 如何在饥饿营销策略 网络营销的常见问题深圳网站上线方案 营销策划品牌事件口碑 移动营销编码 网络安全宣传 中网办 中国培养 信息安全 网络安全方面的人才 培育效果 培养机制 快速网络营销软件 网络营销中手机网站建设 的作用 陕西网络营销公司排名 饿了么营销案例 通信信息安全培训通知 极速网站建设 网络营销3.0 电子书 网络信息安全与防范技术 北京做网站的公司 银川制作网站 微信营销成功的企业 2015年网络安全预测 中国信息安全公司 美国网络安全法律 什么是工业控制网络安全 银行业网络安全法如何用代码设计一个网站有前台和后台一般用什么语言设计网站 微信点对点精准营销 信息安全 应急响应 进行公司网站建设方案 江苏营销型网站公司 注册信息安全员培训 全国网络安全日 网络安全系统开发公司 网络营销与物流 网站总类 营销推广思路 网络安全工程师论坛 网络安全工程师论坛 饿了么营销案例 广州信息安全评测中心 苏州 网站制作公司 信息安全 应急响应 陕西网络营销公司排名 珠海企业集团网站建设 2015年网络安全预测 网络安全的基本特征有 网络安全顶级会议 网络安全 监控 关键词 中文域名怎样绑定网站 营销推广思路 微信营销成功的企业 信息安全系统的要求 海丰网站建设 海丰网站建设 网络安全会议 建行企业网站 网络安全 监控 关键词 网络渗透测试-保护网络安全的技术工具和过程 武汉本土互联网站南京网站建设公司 网络新闻营销推广代理 网络安全错误 首都网络安全论坛 启明 网站设计文档 南宁网站建设7make 企业网络安全实现的方案 信息安全系统的要求 开发网站的目标 快速网络营销软件 公安网络安全保卫局 四川省网络安全法 工信部 网络安全法 政府网络信息安全方案 个人网站制作 网络新闻营销推广代理 2015年网络安全预测 注册信息安全员培训 网络安全态势感知技术与系统 网络信息安全与防范技术 十大网络安全上市公司 为什么网站生成后不显示 工信部信息安全认证中心 微信营销成功的企业 分栏式的网站有哪些 重庆 手机网站制作 网络安全事件2017 中国网络安全平台作业 青岛家装网络营销推广 香奈儿的营销 创新的商城网站建设 江苏营销型网站公司 网络安全错误 网络安全的基本特征有 信息安全logo 服务类做网络营销 企业网络营销的缺点 工信部信息安全认证中心 广东做网站 重庆 手机网站制作 全国网络安全日 什么是工业控制网络安全 广东南方信息安全产业基地有限公司 数据安全保护系统 破解 互联网与信息安全,-1 铜陵网站优化 广州达内网络营销 北京信息安全大会 电商服务营销 富阳网站 首都网络安全论坛 启明 中央网络安全 管理互联网 北京做网站的公司 政府网络信息安全方案 网络营销中手机网站建设 的作用 ios开发 信息安全,-1 海丰网站建设 网络安全事件2017 安全报道与网络安全计划方案 创新的商城网站建设 创新的商城网站建设 2015最新网络营销课程 定制os 信息安全 信息安全是哪三者紧密结合的系统工程 首都网络安全论坛 启明 四川省网络安全法 十大网络安全上市公司 信息安全 应急响应 信息安全系统的要求 房产类网站制作商 中国信息安全公司 通信信息安全培训通知 安全报道与网络安全计划方案 广东南方信息安全产业基地有限公司 数据安全保护系统 破解 网络安全 监控 关键词 悬浮滚动的网站jquery在线qq客服咨询代码 有6套皮肤可选 龙岗网站建 网络信息安全专业课程 广州网络营销外包 中国网络安全平台作业 十大网络安全上市公司 河南省网络安全局 企业网络营销的缺点 珠海企业集团网站建设 雄安网络营销外包 实行信息安全等级保护 好未来信息安全规范正式实施时间 信息安全logo 网络安全 监控 关键词 网络安全技术分享网站 南宁网站建设7make 网络营销中手机网站建设 的作用 注册信息安全员培训 怎么学营销 北京做网站的公司 黑客风云vip教程 信息安全渗透测试课程 企业网络营销的缺点 个人网站制作 江苏营销型网站公司 通信信息安全培训通知 信息安全测评工作流程 川大信息安全公司 安徽省信息安全比赛 悬浮滚动的网站jquery在线qq客服咨询代码 有6套皮肤可选 南宁网站建设7make 工信部信息安全认证中心 网络安全错误 中国信息安全公司 营销策划品牌事件口碑 树莓派做信息安全 免费域名网站搭建 网络渗透测试-保护网络安全的技术工具和过程 工信部 信息安全要求 网络安全错误 电商服务营销 信息安全logo 网络营销与物流 免费网站建设怎样 悬浮滚动的网站jquery在线qq客服咨询代码 有6套皮肤可选 网络营销中手机网站建设 的作用 网络安全工程师论坛 广东做网站 富阳网站 好未来信息安全规范正式实施时间 信息安全大事情 香奈儿的营销 微信点对点精准营销 龙岗网站建 杭州制作公司网站亳州网站建设 信息安全等级防护 实行信息安全等级保护 营销策划品牌事件口碑 营销活动公司 重庆 北京做网站的公司 顺德制作网站价格多少 信息安全 应急响应 网络安全工程师论坛 成都网络信息安全协会 网络安全态势感知技术与系统 好未来信息安全规范正式实施时间 网站设计文档 香奈儿的营销 微信点对点精准营销 网络新闻营销推广代理 信息安全测评中心 通信信息安全培训通知 实行信息安全等级保护 网络安全顶级会议 网络营销的常见问题深圳网站上线方案 北京做网站的公司 移动营销编码 网站如何做好视觉营销 北京信息安全大会 中国信息安全公司 信息安全是哪三者紧密结合的系统工程 网络安全会议 网络渗透测试-保护网络安全的技术工具和过程 深圳全网营销总裁班 陕西网络营销公司排名 注册信息安全员培训 实行信息安全等级保护 四川省网络安全法 宁波网站建设公司 信息安全 应急响应 信息安全系统的要求 信息安全测评中心 中国信息安全公司 好未来信息安全规范正式实施时间 安全报道与网络安全计划方案 南宁网站建设7make 武汉本土互联网站南京网站建设公司 北京信息安全大会 通信信息安全培训通知 广州信息安全评测中心 服务类做网络营销 中国网络安全平台作业 十大网络安全上市公司 河南省网络安全局 企业网络营销的缺点 珠海企业集团网站建设 雄安网络营销外包 实行信息安全等级保护 好未来信息安全规范正式实施时间 南宁中小企业网站制作 网络安全 监控 关键词 创新的商城网站建设 2015年网络安全预测 信息安全是哪三者紧密结合的系统工程 信息安全logo