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
网站建设价目鸟哥的linux私房菜 认识网络安全高端大气网站设计欣赏邢台网站制作市场网络安全编程培训网络安全数据集网络营销数据的来源和作用乐清英文网站建设2017网络安全峰会视频信息安全技术 交换机安全技术要求,-1网络营销学概论茫茫宇宙,点点繁星。名不经传,却塑造了一位超级无敌大剑修!!古蓝星,只是一个边陲宇宙,却是叶泽从小赖以生存的家园。家人相继离去,担子只能由年幼的自己扛!睡梦中醒来,改变了命运,一剑在手,天下我有!!我有一剑,可破诸天!!!!年少不经事,今朝登天门。在城市中,人们发现自己身边的朋友总是会流传着一种说法 不要自己一个人待在一个没人的地方太久 或许会消失也说不定,谁知道呢? 进入暗室,进入新的世界,或许我们能找到答案为了心中的正义法官老爹的艰难前路,追求人生的超脱律师儿子的接案经历。一部家族的奋斗史,三代父子的命运路。社区志愿者小金在为辖区居民做服务时,莫名被陷入了“死循环”,困在同一天里出不来,身处日复一日的时间困境,小金该如何走出时间的牢笼,他不明白为什么会在自己身上发生这样离奇的事情。默默签到十年的秦风,签到了太多的属性点。 有一天,赵高来到秦风面前,宣布他是祖龙大公子后要带他回去时,却发现他秦风的潜力太渣,当场要离开,让他继续留在这虚度一生。 这一天,秦风过去的那记忆涌现了出来,他终于知道他是谁了,他是祖龙的大公子,当初祖龙看他体质弱于常人,害怕他在皇宫被害,送在外面寄养。 这一刻,他秦风知道自己要把属性点点在什么上面了。 下一秒,他把潜力属性点点满了。 就在他等待着三天后,彻底激活潜力点时。 与此同时,天地变色。 激活金榜,金榜降世。 紧接着, 战力榜、名剑榜、剑神榜、杀手榜、组织榜,铁骑榜,统帅榜、气云榜等相继被曝光。 潜力榜第一,超凡入圣,属于大公子-秦风(原名:嬴风) 战力榜第一,九天之巅,属于大公子-秦风(原名:嬴风) 铁骑榜第一,大雪龙骑,属于大公子-秦风(原名:嬴风) 嬴政:“这就是我那体质弱的大儿子?!” 一位部队退伍的小伙子,机缘巧合做了乡镇书记的司机,从此开始了他在官场上的逆袭之路一个末日的到来,人类一败涂地,幸存者们需要在艰难的环境里生存下来,且看林宇如果在这艰苦环境下装逼打虎。一个高考过后,想去泰山旅游,放松一下心情的少年,因为一个乐于助人的小举动,开启了一场梦幻旅程......  天地万物瞬息万变,冥冥之中早以注定也早有变数。存在即有原因,两个世界的交错。男主白星辰在冥冥的定数中又会产生什么变数,两界之中因人而异有这这么个传说。   两界之中因一种冥魂力的扰乱,让这两个世界变得不正常起来
重庆网站设计公司排名 银监会 网络安全 鞍山做网站 怎么制定网站 网站模 网络安全部 旅游网站建站 免费个人网站申请 信息安全会议排名 微网站建设 全景网络安全 网络营销直通车 国家网络安全信息小组 国家网络安全部 巴中网站建设 销售网站 网络安全 知识点 上海营销外包公司亚太区信息安全大会 网络安全部 高端大气网站设计欣赏 总参网络安全防护中心 网站品牌推广 网营销策划方案电商 鸟哥的linux私房菜 认识网络安全 网络信息安全 考试系统 高端大气网站设计欣赏 引导营销 网站营运 网站建设的售后 网站后台更新没有变化 网络安全法 互联网 信息安全会议排名 宝洁公司网络营销分析 关于网络安全的建议 信息安全等级保护管理办法(试行),-1 网络安全 日志分析 设计网站考虑哪些因素 网站建设价目 中国网络安全信息化领导小组名单 信息安全风险评估的一般步骤 网络营销数据的来源和作用 网络营销日常工作内容 网络营销的发展 四川微信网站建设 临沂网站设计 佛山网站设计优化公司网络安全热点问题 什么是营销型的网站推广 前端营销 广东信息安全 池州做网站 信息安全等级保护管理办法(试行),-1 乐清英文网站建设 郑州机械网站制作 深圳市能士信息安全公司 佛山网站设计优化公司网络安全热点问题 建网站后如何维护 汽车营销案例 网络安全空间大赛 网站建设公司河南郑州 软文营销案例有故事 天津电商网站制作 慈溪网站设计网站制作合同 聊城网站建设招聘 营销扣扣是什么意思 邮件营销推广是什么 山东 信息安全 检查 电商短信营销 济南微信网站 慈溪网站设计 2014年中国跨境电商网络营销大会暨谷歌seo高峰论坛 备份 网络安全审计技术 关于网络安全的建议 网营销策划方案电商 网络安全部 免费个人网站申请 中山网站建设 怎么营销 四川微信网站建设 慈溪网站设计网站制作合同 上海运营营销号大公司 山东企业网站建设 电商短信营销 北京高级网站建设 免费个人网站申请 网站管理公司 网络营销目标市场分析 逛信息安全论坛 信息安全重大事件2017 长沙电子商务网站建设 网络安全隔离交换技术 国家网络安全部 广东网络安全执法 网络营销目标市场分析 局域网的网络安全 全景网络安全 网络安全规划拓扑 网络安全规划拓扑 als冰桶挑战算那种网络营销 微网站建设 鞍山做网站 网络安全法 互联网 东莞网站公司 营销产品定位 网站转移 临沂网站设计 信息安全风险评估的一般步骤 涪陵网站建设 国家信息安全保护 怎么制定网站 可信赖的网站建设案例 局域网的网络安全 中国网络安全大会2014 信息安全学 手机网站建 沈阳科技网站建设 网站管理公司 网络安全数据集 国家网络安全信息小组 网络信息安全 考试系统 企业网站内容如何更新 总参网络安全防护中心 信息安全 行业 2015 网络安全部 军用信息安全产品认证证书等级 国家网络安全信息小组 济南网站建设 西安网站托管专业公司 逛信息安全论坛 中国网络安全信息化领导小组名单 临沂网站设计 中山网站建设 网络安全 知识点 鞍山做网站 公安部信息安全 中心 网上营销 网营销策划方案电商 关于网络安全的建议 广东信息安全 网络安全 日志分析 营销活动培训 cio信息安全高峰论坛 网络安全协调处 外贸网站建设软件 梦想网络安全技术论坛 信息安全风险评估的一般步骤