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
邮票市场邮票吧欧美群迅雷下载奥运邮票邮票收藏价格表邮票市场邮票市场邮票收藏邮票价格纪念邮票游戏世界观 巨龙时代自推背图出世以后,皇朝不再是一个人的天下。江湖风云变换,但是江湖人都在驱动着时间的齿轮,使得江湖令变得接近永恒。李志德作为唐王的后人,一直希望寻回江湖令,重建大唐盛世,但也对现在国家充满了信心,······古神之战,将完整的大陆打得支离破碎,留下了遗址与破损的神器。旧天国,新天国,莱茵,福德,安格恩,天星,六潮……不同的国家都有自己的特色。在这里,还有一群有强大特殊能力的人,被尊称为称号使者,他们有着怎样的生活?和常人又什么不同?普通人难道永远达不到他们的境界吗?一切尽在《破碎的大陆》 (心动了吗?那就赶快阅读吧。BTW作者是业余的,更新比较慢,不过质量还是可以的)邢毅开车送公司经理亲属回乡下,回来遇到暴雨将他冲进山洞,被同事从工厂深水泵井里救出,意外发现自己重生回到二十五年前。 前世上,他二十五岁时进入锦绣县宏达道桥公司,这里有高中时的同学,公司的骨干精英,未来的掌舵者。然而并没有得到同学的关照,反而遭遇冷落,被瞧不起。 他干的是混泥土搅拌工,钢筋帮扎工,搬运工等等,二十五年都在基层一线,因能力弱,胆子小,没能耐,无法扭转自己的命运以及家庭生活面貌,妻子在邮电局做职员,屡被上司欺凌,儿子到就读年龄择校时门槛高耸,父亲被冤屈下放农村,母亲患病也未能进行最好的治疗……一句话,他一辈子活得类,窝囊,不值。 上苍安排,让他的人生再来一次,从此他的工作,事业,爱情,父母、家庭,孩子……且看他怎样展开,怎样掌控渐次而来的机会,怎样应对一并降临的竞争和阻碍,完成新的使命,从而实现人生逆袭。这是一个关于已经打败最终BOSS的家伙的故事,但他并不是一个英雄。少年被家族遗弃,遭受刺杀修为被废。 危难之际开启镇魂世界,神秘女子百般磨练,终修剑道。 自此修行坦荡,领悟无上剑道,修不灭剑体。 修武技,破苍穹,入圣域,掌握天下权,醉卧美人膝,翻手为云,覆手为雨, 轻挥手中剑,剑出移山镇海,诸天星辰陨落,横断八荒四野; 九洲雷霆动,剑气侵万古,临绝世剑神。匚系统提示,假如你有机会穿越到三国选义父,你会选择谁,是汉室宗亲刘备,还是汉贼曹操,或是江东孙权,你会选择谁呢?]在丧尸横行的末世里怎样才能活下去,拼命吧!少年! 小说叙述的坏境就是在平田村。何谓“云上平田”,其实是指平田村海拔高,可与云层一较高低。小说始于平田村也终于这个大环境。在云尖平田村发生的一切都那么耐人寻味。 平田村的张志鹏是一个肮脏、邋遢的坏小孩。但知心好友叶洛阳的出现,以及与她经历的种种,让张志鹏在“爱的感召下”逐渐转移心性。最后叶洛阳家中变故,无奈举家离开了平田村。 之后张志鹏入平田村唯一一所学校“平田一中”读书,这所学校授教范围从小学直至高中。这是张志鹏第一次上学,因此在班级里基础最差,加之他那不好好学,吊儿郎当的样子,所有老师同学都对他嗤之以鼻,避而远之。之后班级里新来了一位王老师,彻底启蒙了张志鹏以后的学习和做人之路。在这期间张志鹏目睹了酒鬼爸爸叛逆出轨、妈妈绝望生病,让本就不富裕的家庭雪上加霜,逐渐体会到了人情世态,坚定了自己的决心。 成年后的张志鹏,穿着西装革履,拎着行李,坐在回平田村的火车上,嘴里不停地念着新村官上任的演讲稿。一个出身贫寒的人 ,进入警局有多大的用处
邮票市场 邮票市场 中国邮票 邮票图片 邮票吧 第三轮生肖邮票 邮票网 欧美群迅雷下载 邮票价格 邮票行情 中国邮票价格表 南京文交所钱币邮票交易中心 文革邮票 十二生肖邮票 纪念邮票 邮票收藏价格表 邮票市场 文革邮票 上海邮票网 邮票 上海邮票网 南京文交所钱币邮票交易中心 奥运邮票 邮票 邮票网 世界上第一枚邮票 香港回归纪念邮票 南京文交所钱币邮票交易中心 邮票交易所 女幽灵 百度网盘下载 迅雷下载 第三轮生肖邮票 生肖邮票 中国邮票 南京文交所钱币邮票交易中心 民居邮票 邮票图片 女幽灵 百度网盘下载 迅雷下载 生肖邮票 上海邮票网 邮票图片 诸天,从华山开始一剑求尊载物记科学应劫手册源能重生作为商人,会修仙很正常啊!三国从杀敌爆装备开始崛起绝代阴阳养鬼师灵气复苏:扛着墓碑去斩妖神级操盘手天世轮回暗夜赞歌钓鱼修仙之路九天荡魔祖师之重生完美系统之尘世闲游法医的秘密百诡夜艳我真的不想这么好运啊王途末路文学杂记水波窗幔图片请复制到浏览器打开 顺德二手房 如何介绍艾兰仕衣柜 佛山衣柜厂家 上海产马桶 南通货架厂 东莞超市货架 临汾小区 伟迈价格 窗帘工具 铜套厂家 仓库货位线 浴室柜台盆一体的好吗 博洛尼 沙发 长沙 四季沐歌家具 蒸压釜厂家 拆惠安小区 遥控窗帘 浴室柜检验 缓凝剂价格 铝价格 金地未未来房价 深圳 二手房 推车货架 纽密马桶 浴室柜 实木 防潮 沈阳大东望花搬家公司 搬家公司可以带宠物吗? 整体化卫浴 深圳宝安公民搬家公司 水曲柳家具的优缺点 马桶座太高 螺纹钢现货价格 辉煌卫浴 青瓦厂家 铝扣板厂家 深圳买窗帘 青岛仓库货架 上海大众延吉销售公司电话号码 中国衣柜十大品牌 红木家具 定制衣柜封边条 拆 佛山大众搬屋 电话 杭州小型立体仓库厂家 深圳办公家具公司 马桶大厦 后沙峪搬家公司电话 壁挂炉价格 网上窗帘展 衣柜推门怎么找供货商 深圳衣柜订做 马桶好处 卫浴代理招商加盟 岳阳二手房 新龙城二手房 梅州小区 湖北蕲春房价 立体化仓库技术 南县二手房 小区喷泉下面车库 王府井 近5年房价走势 衣柜带子 德峰小区 12万 深圳龙华新区搬家电话 仓库布局与库房规划 窗帘网soso 仓库展示牌 卫浴网 电话搬家 旧地板 家具 烟酒货架厂 嵌入式 衣柜 定州二手房 大众公司电话 灭蚊灯价格 西安东门搬家公司电话号码 铝酸盐水泥厂家 广州家具网 唐山四通搬家公司电话号码 卫浴出口 厦门做窗帘 成都卖浴室柜的地方 自动门感应器价格 北京回龙观利康搬家电话 平安小区属于阳城哪个乡镇 智能衣柜 负压风机厂家 怡心居卫浴 金马桶介绍 经典浴室柜 信瑶家沙发 店 十大衣柜品牌 配电箱价格 双叶实木家具图片 上海办公室搬场电话 卫浴镜柜 内蒙古货架 森浪浴室柜 简单的水波帘头 难燃板价格 丰贝复古系列浴室柜 济南二手房房价