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
大龙邮票上海邮票网邮票市场纪念邮票邮票网大龙邮票大龙邮票中国邮票女幽灵 百度网盘下载 迅雷下载中国邮票价格表刘天莫穿越了,只想老老实实的做个大闲人,但奈何实力不允许。 内忧外患,愣是逼成了救世主,无所不能! 种田,发展工业,驱除外侵…… 且看我,如何成为一代枭雄!岁月匆匆,或好或坏,终其一生,未能明白其中二三,蓦然回首,已无归途。到底什么才是这个世界真实的颜色。在科技日益发达今天 游戏已经不单只是游戏了 而是被赋予了很多意义,它是社交 较量 是年轻人之间独特的沟通的桥梁 随着这些网络游戏的潮流,同时也出现一种新型的学校类别 俗称“电竞学院” 张子凡是一个视游戏如命的高三落榜的学生 高考失败后就一直宅在家 一天他接到了来自K市百耀电子竞技学院的招生简章,在父母的极度反对之下来到了 电竞学院 。 被嘲笑又如何? 总有一天 我会让你们刮目相看 我要证明你才是错的! 因为在这里 有许多和他一样怀揣着相同梦想的人一起同行! 虽然经历过不少的失败,但是他并没有退缩 而是不畏惧失败 勇往直前 最后他终于站在了CFPL的职业赛场上! 实现了自己目标 也寻得了良人归!!!   玄阳穿越洪荒大地,拜师通天教主后,觉醒剑尊系统。   从此,玄阳走上了日复一日的拔剑之途。   于他而言,只要拔剑,就变强!   拔剑十万次,一剑断天河。   拔剑百万次,一剑可屠圣。   拔剑千万次,一剑平天地。   拔剑亿万次......   玄阳:“我有一剑,可平天地,逆阴阳,敢问天地众仙,谁可接我一剑!”   自此,玄阳剑圣之言,广布洪荒。苏远携武道修改器一朝穿越,踏入这片光怪陆离的世界。 人间苍茫,众生皆苦,恶鬼食人心,人道满污浊,半夜孤魂扰人清,魑魅魍魉乱大千…… 苦海无涯,何以自渡,唯靠一双铁拳打穿这暗黑乱世! PS:这是一个生死看淡的莽夫物理超度妖魔鬼怪的故事源界大劫,源主归源(本小说归源即为死亡的意思)。百位守护神内战,不死神君作为百神之一,在战争中自爆身亡。灵魂却意外被传送至边缘宇宙。在这个宇宙中,不死神君找到了适合的躯体.......(作品分类不为真,此小说元素较多,难以分类)一只名叫小跳体弱多病的火焰布偶猫竟然是电影穿越系统?不得了不得了,原来供奉多年的猫主子竟然是一块香饽饽。“小跳,给我一把RPG,我要干死这头蜥蜴人”“小跳,给我兑换蜘蛛侠血统”“哈哈,有了这正义之心加成,我也能拿起雷神之锤了”“小跳,这个妹子好漂亮,来做我的僚机”看主角如何和自家的猫咪大闹电影世界。神明布下游戏,每个人都可以参与并拥有变身铠甲的能力,不同的召唤器散落世界,获得它的人会变得如何呢? 23世纪,人类社会发展到了新的高度,虚拟网游展现出蓬勃发展的局面,一部神话级网游《战国策》的问世,更是开辟了新纪元……【本书又名:《灵气复苏:异生入侵!我,永护世界!》】 灵气复苏时代的开启,使人类觉醒了血脉获得了各式各样的异能。 伴随着灵气复苏开启,异生物接踵而至,人类奋勇抵抗暂获和平。人类通过对灵气复苏的理解,使得这个世界产生了两种职业--武师与御灵师。 凌岚轩,一个刚刚成年的觉醒者,因为天赋等级太低,被各种人嘲笑和侮辱,就在被别人踩在脚下辱骂时,却阴差阳错的觉醒了系统。 情绪收集系统开启!!! “啥?情绪收集?只要产生系统所需要的情绪,就能获得超高奖励?” “啥?我重新觉醒的异能竟然是双异能?太不可思议了。“ “我的双异能,其一竟然是......这不是挂?那是什么呢?”
香港回归纪念邮票 邮票网 女幽灵 百度网盘下载 迅雷下载 第三轮生肖邮票 纪念邮票 十二生肖邮票 猴年邮票 香港回归纪念邮票 邮票网 南京文交所钱币邮票交易中心 邮票吧 邮票 邮票交易所 上海邮票网 邮票行情 邮票价格 中国邮票 邮票交易所 邮票收藏价格表 邮票市场 邮票收藏价格表 邮票 龙邮票 邮票市场 女幽灵 百度网盘下载 迅雷下载 第三轮生肖邮票 欧美群迅雷下载 邮票 世界上第一枚邮票 纪念邮票 南京文交所钱币邮票交易中心 香港回归纪念邮票 邮票互动网 邮票图片 文革邮票 猴年邮票 邮票收藏 香港回归纪念邮票 生肖邮票 猴年邮票 穿越到影视的反派魔族公子非道非常道重返前半生诸界黎明之万法争锋从继承悟空绝学开启无敌年少复仇记!诡事异录超可爱异灵现象研究部我不过是无敌而已,别惊讶民间轶闻往事群星之间异神归来请 神完美特警废土之辉剑神九幽拾少年神游记之道破虚空特种兵之从炊事员开始崛起窗帘的水波请复制到浏览器打开 水波尺使用 四通搬家西城区电话 中国家具论坛 电脑沙发椅 凤尾水波裁剪视频 2012年最新欧式家具 深圳红蚂蚁搬家公司 内衣柜 奢侈 美心防盗门价格 旧地板 家具 济南窗帘 乐浪浴室柜 中至信 沙发 陕西办公家具 铜包钢厂家 虹吸式马桶结构 索菲亚衣柜图片 仓库4层货架尺寸 南昌大众搬家公司电话 圆角衣柜 天生卫浴 南京阁楼式平台货架阁楼式货架优质方案阁楼式货架厂家直销 塑石厂家 上饶二手房 唐轩北廷 小区 中国家具招聘网 进牌马桶 重庆沙发翻新 左域马桶 成都货架公司 秦皇岛房价 优牌家具集团 诗尼曼衣柜 差 玻璃隔断厂家 纱窗门厂家 拼接货架 木线条厂家 朝阳区静安里小区静安里甲 黄花梨浴室柜 企业灶 乐家的马桶 奉贤区北唐新苑房价 广州重型仓库货架厂家 韩剧衣柜 惠尔洁卫浴 钟落潭搬家公司 信阳小区 南昌铁路二村房价多少 会所家具 浴室柜批发 搬家公司 番禺 窗帘等分尺 窗帘配套 婴儿床 靠飘窗还是衣柜 进门见衣柜 卫浴有哪些品牌 马桶坐便盖 卡蒙浴室柜 智能马桶十大品牌 浴室柜合页 进口家具 二手房价格 浴室柜风格 集成吊顶价格 仿古青砖价格 窗帘电机厂家 晨阳水漆价格 墙壁式货架 大理石挂件厂家 深圳蚂蚁搬家官网电话 下南路小区房价 杭州搬家公司电话 玻璃砖价格 仓库主要功能? 芜湖江北新区房价走势 苏州小区 圣象地板价格表 新马桶回收 惠达马桶吧 编藤家具沙发 兄弟搬家公司官网电话号码 杭州搬家公司 电话号码 仓库机械化设备 卫浴批发城 广州大众搬家官网电话 红星美凯龙家具 沙发家具厂家 成都实木浴室柜 抽水马桶漏水怎么办 PVC浴室柜 藤椅沙发 u型玻璃价格 西安二手房出售信息 搬家公司沙河 美中原马桶 龙岗足浴沙发定做 郑州搬家公司电话多少钱 衣柜 投影面积 国内卫浴10大品牌 娄底房价 沙发床品牌 不锈钢栏杆价格