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
重庆网站建设公司那好情感营销 3个c营销外包是什么意思网络营销成功的案列信息安全风险管理培训内容淘宝营销定制网站的好处有哪些注册网络信息安全师学院网站规划方案国家网络安全园区东营市报名系统网站设计公司网吧厕所墙上的联系方式千万不要随便加。叶锦年本以为自己运气爆表遇上了学姐交友,两人共处一室时,学姐的男朋友却找上门来...... 在学校被欺辱,就要反抗!拳头,不是为了欺负弱小,而是为了守护自己在意的东西而挥动。面对强敌,从不退缩,因为我的体内,有着那股能在瞬间被点燃的热血。未来世界,人类科学家研究出了变异病毒。神明布下游戏,每个人都可以参与并拥有变身铠甲的能力,不同的召唤器散落世界,获得它的人会变得如何呢?一场末世浩劫突然来临,蓝星炸了。 死亡,亦是新生。 然而,噩梦才刚刚开始。 一轮轮的末世危机,不断来袭。 想要活下去,运气、智慧、实力、勇气缺一不可。陈御芝醒来,发现自己穿越到了自己曾经玩过的游戏《域外仙魔》中,而随之而来的除了系统面板,还有绑定的太祖长拳。 你有法术,&amp;quot;看我太祖火球拳。”一拳击出,举火烧天 你是剑仙,&amp;quot;看我拳剑相杀。”一拳击出,万剑横空 任你万法齐出,我自一拳破之。 穿越到玄宁大陆,发现自己的金手指就是能够捡取各种属性。 从此,玄宁大陆多了一个捡取属性就变强的家伙。 【生命值+100】【力量+100】【修为值+100】【体质+100】【精神+100】【混沌血脉+1】【万剑诀+1】【神瞳+1】...... 修炼是不可能的,这辈子都是不可能的,实力不够,多捡点修为值就突破了。 你跟我说力量强,看我一拳如何锤爆你。 别说你的速度强,我的速度属性都破万了,不用身法你都追不上。 蛮族:“这个玄宁太变态了,防御这么强,还怎么打?” 古族:“他到底什么血脉,为何能够融合这么多强大体质?” 风族:“快跑,这个玄宁要追上来了。”国运游戏尸城求生的唯一幸存者李倾回归了。 他没有虚拟人物当队友,也没有扮演角色的金手指。 但是当国运游戏播出的时候,所有人都认为他是个废物。 【徒手造装备,妈妈问我为什么跪着看。】 【这瓶药剂喝了就能有异能?大佬666!】 【大夏选手一定是在作弊!我要举报!】 他在节目中手造装备,获得异能,合纵连横,尽显大夏智慧。 但他也受到了各国的污蔑和构陷。 李倾:愿得此身长报国,何须生受名与利。 简介无力,请看正文,如有雷同,纯属巧合。月寒人醉鬓成霜,红尘若梦几千年。漫漫仙路,当剑啸万里,何惧热血染青天!现在求道者,修道者,问道者空前绝后的多。我也曾是鲜衣怒马少年郎,最终还是被无尽的痛苦和恐惧所击溃。我将为大家揭秘所有,我希望能通过这本书告诉大家什么是真的,什么又只是风俗民俗文化废柴穿越异世界,在这鬼怪丛生的地方,他该如何生存下去?
富阳网站建设考信息安全认证 网络安全公司 东莞网站改版 罗湖网站制作 网络与信息安全西电 网络与信息安全西电 第四届广东省网络安全 网络信息安全测评企业 5设计网站 网络安全服务内容 五级网络安全是 建网站可靠 免费注册网站空间 2017年1月信息安全 信息安全专业 macbook 网站商城系统 网络安全密钥win 10 沈阳网站设计 网站制作哈尔滨 泰安市营销 信息安全测试平台 邢台网站建设服务商 网络安全大数据分析 手机网络营销怎么做 重庆营销策划服务 手机网站制作机构 网站的形式 绵阳市公司网站建设 南山建网站 信息安全会议 2017 重庆网站设计公司排名 怎么建设网站 i无线网络安全协议可以提供 1)小米用了哪些网络营销方式 网络营销成功的案列 富阳网站建设考信息安全认证 信息安全暑期教师培训 软件信息安全测评 网络安全管理指引 金融行业信息安全事件 《网络安全》2017 建公司网站要多久 网站入口设计规范 重庆微信网络营销推广 温州手机网站制作公司电话 信息安全 身份鉴别 南昌网站优化公司 罗湖网站制作 互联网大会2014 网络安全 我国网络安全形势 青岛营销培训学校 台州网站建设 网络安全行业前景2016外贸网站响应式 网站访客 信息安全 身份鉴别 许可email营销怎么做 上海网站建设网站制作 网络安全大数据分析 有关建设网络安全的文章 销售网站 广州信息安全集成商 门户类型的网站 学院网站规划方案国家网络安全园区 上海网站建设网站制作 2017年1月信息安全 网络与信息安全测评中心 上海的广告公司网站建设 网站开发公司 襄樊做网站 软营销理论 网站商城系统 病毒营销的注意事项 上海高端网站设计 网络安全设备 网什么意思 公安部信息安全 i无线网络安全协议可以提供 国家注册信息安全员 沈阳网站设计 网站评测的作用 企业网站优化 信息安全领域知名企业 第四届广东省网络安全 网站制作哈尔滨 长春880元网站建设 重庆网站设计公司排名 优秀网站设计欣赏 泰安市营销 马鞍山网站设计 深圳企业网站建设哪家好 昆明 信息安全 信息安全测试平台 h5制作企业网站有哪些优势 网站策划机构 网络营销从事工作内容 邢台网站建设服务商 深圳企业网站建设哪家好 信息安全分几大类 信息安全工程师软件 网络安全大数据分析 idc网络安全市场 台州做网站优化哪家好 南昌网站优化公司 手机网络营销怎么做 网站的形式 昆明做网站公司 戴尔网络营销的关键 重庆营销策划服务 五级网络安全是 淘宝营销 陕西信息安全等级保护网 手机网站制作机构 个人网站欣赏 汽车营销策划的案例分析 企业信息安全管理 执行 网络安全管理员证书 国家注册信息安全员 网络安全手机 绵阳市公司网站建设 马鞍山网站设计 网络安全管理指引 山西网络安全公司 企业官网响应式网站 5设计网站 广州市信息网络安全协会 网络营销的网络直播 重庆网站建设公司那好 信息安全工程.,-1 邢台网站建设服务商 情感营销 3个c 企业整合营销公司 中国邮箱营销edm 国内渠道整合营销 温州手机网站制作公司电话 注册网络信息安全师 自己做网站 需要哪些 2017年1月信息安全 昆明 信息安全 互联网营销 案例视频教程 i无线网络安全协议可以提供 公安部信息安全 定制网站的好处有哪些 富阳网站建设考信息安全认证 1)小米用了哪些网络营销方式 信息安全具有特性 网站设计建设趋势