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
建功能网站网站页面网络安全用户信息包括网络营销方案流程教育部 网络安全罗湖高端网站设计贵州网站优化信息网络安全模型网络安全情况分析营销环境商城网站要怎样设计网站设计公司 长沙隐私泄露网络安全事件网络安全攻击例子网络公司网站建设网络安全的威胁的概述哪里做网站杭州的网络安全公司上海手机网站建设电话咨询网站添加属性信息安全研究中心wifi开放网络安全吗做网站建设北京网站制作模板建网站可信赖的响应式网站可信赖的响应式网站建功能网站企业数据信息安全 软件网站价钱上海网站建设公司向季明原本是不相信世界上是有鬼的,直到有天他撞鬼了……神秘的世界向他敞开,走不尽的楼梯,喂人“吃屎”的变态蛊师,出卖灵魂换取力量的死徒,窃取鬼能力的诡法师,灵魂觉醒者,深渊……原来世界名校国际刑警学院竟然是一所培养驱鬼杀恶魔的人才的地方……一八九〇年六月六日傍晚 东北地区大兴省紫阳县 逍遥山逍遥庄 “江湖远,近斜阳,天涯各苍茫……” 赵凡哼着欢快的歌曲,手里提着一只足有两斤重的大王八,蹦蹦跳跳地向家中走去。 突然,逍遥庄方向燃起熊熊大火,火光烧红了半个天空,浓烟滚滚,直冲云霄。庄内空无一人,连鸡犬也销声匿迹。 踏进祠堂大门,一股血腥味扑鼻而来,全庄上下189口人,倒在了血泊之中。 从此,他踏上了一条漫长而曲折的复仇之路。“三个月后灵气复苏,全民兽化植物化!” “同时,蓝星原住民远古蛮兽会走出地壳,两极反转,人类危矣!” 重生回到灵气复苏时代降临三月前,白良提前变异成柳树。 通过制造神迹,他被中州奉为通天建木! 国家一边疯狂喂养白良,一边根据白良的指引开启一系列准备计划,每一天都在震惊全球! “中州竟然开始迁都了!” “中州围绕江南市建立新天都!” “中州收回了所有外驻部队,千万军队围绕江南市建立绝密保护区!” “江南市上空有一层万米高空屏障!卫星完全侦察不到!” “中州江南到底隐藏了什么?” 三个月后,灵气复苏时代降临! 全球人类深陷水深火热,弱肉强食! 而此时白良于江南市公园中崛起,鞭劈八面蛮兽,以柳神之名抵抗四方兽王,甚至硬撼兽皇! 这次,换他来守护中州族人! 柳神庇护之下,其余国家人类还在四处躲避蛮兽之时,中州族人正在不断诞生一尊尊神!明朝末年吏治败坏,山西、陕西、河南等地重大自然灾害不断,民大饥不能活,关外女真崛起,多次入关劫掠。 大明境内狼烟四起,明失其鹿,天下共擒之,一个医生穿越到明末成为庶子,庶子也风流,张景开始他精彩的擒鹿之旅。 小道士出世当警察,收魂、灭魄、封神明,几世轮回定天下。 布局不断为世人。 正可谓:时光为盘,魂做子,千年棋局起风云!苏离穿越平行世界,却遭遇神秘复苏,昨天出门捡的钱,也变成了买命钱!   生死关头,居然觉醒了灵异编辑器,还能制造万鬼?   【污秽的绣花针】+【月光下的尘埃】+【红裙】,恭喜宿主,获得s级别鬼王,【猩红女王】   【破电视机】+【断裂的信号线】+【观众的一点恐惧感】,恭喜宿主,获得s级别鬼王,【咒怨之女】   漂亮国,白象国,霓虹国首脑:哈哈哈,听说了吗,离哥最近觉醒了好多极度危险的s级别游戏邪灵,离哥完蛋了!人本无意纷争,奈何世事无常,转世少年窝囊十六载,隐忍修仙,踏上自我历练之道,走常人不走之路,做常人不做之事,坚守本心,坚守所爱,而后被迫卷入这仙神世界的纷争……一针百病皆无形,两针临门也有盈,三针四针鬼捞人,世上再无后续针,若能唤到八九针,阎王也能变活人!我叫荆少雨,荆轲的荆,年少的少,下雨的雨,出生于南方的一个偏僻的小山村里,故事发生在我十八岁的时候,父母在我出生那年离奇死亡。一个少年得到仙笔的故事
信息安全等级在哪查询 网络安全的威胁的概述 信息安全业务 信息安全研究中心 信息安全应急处理服务资质认证 建网站收费 邢台网站建设服务周到 武汉信息安全与人才 谷歌网站地图 互联网营销教程视频 网络间接营销 淄博网站优化 哈尔滨网站设计公司 深圳网站设计制作 中山企业手机网站建设 建网站收费 网络安全 屏蔽 网络营销工具及方法的运用 隐私泄露网络安全事件 信息安全专业全国哪些 信息安全应急处理服务资质认证 基于区块链的信息安全,-1 信息安全研究中心 社会化口碑营销 可信赖的响应式网站 建网站收费 2015汽车信息安全报智能网联 信息安全,-1 分析营销环境 山东专业企业网站建设 营销外包价格 营销外包价格 2016年网络安全年会 北京网站制作 阿里营销网 杭州的网络安全公司 营销项目的推广技巧 最先进的网络营销 信息安全培训 京东的市场营销战略 安徽网络营销