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
邮票市场中国邮票价格表邮票十二生肖邮票中国邮票价格表邮票图片龙邮票女幽灵 百度网盘下载 迅雷下载奥运邮票邮票一封神秘的邮件,一座骇人的古塔…… 破旧的残痕断壁,承载着谁的日忆? 是救赎亦或是走向深渊的不归路…… 你听,破旧小区的电话铃声又响了…… “你说,我当时是不是只要反抗了,就不会对他有这种怨恨了……” “我们生于怎样的家庭我们无法决定,但是我们可以决定自己的选择……” 尘封多年的梦啊,会被爱意唤醒吗? 宝塔的第九层隐藏着怎样的秘密……自己练笔随笔安放之处梦里,叶燃扛着一座监狱满世界抓贼,顺便收了几个小弟,教了几个徒弟,养了几个宠物。 梦醒后,小弟成了诸天大佬,徒弟成了神级宗师,宠物成了超级神兽。 某个游手好闲不学无术的私生子,则一脸懵逼的看着手上的天劫监狱里,关着的一群大魔王…… 这特么的不是梦?! ……上一世,他出道八年,却无人问津,老婆抛弃他,女儿因为癌症去世,穷困潦倒,妻离子散。 一朝回到女儿去世前,再次见到女儿的那一刻,他决定,要将全世界最好的都给女儿。 为了赚钱养女儿,一不小心,他唱的歌爆红了网络。 写的第一本小说就被称之为经典。 拍的第一部电影就成了电影学院研究的对象。 …… 当事人叶鸣却抱着怀中的女儿淡笑道:“意外,这都是意外,我只想做个好奶爸而已。”【女帝+系统,全新世界观,不是完美同人】 开局穿越玄幻世界,叶辰获得女帝养成系统。 但在系统进行绑定之时,周围并没有人族 生灵,叶辰的养成对象,被迫绑定为一棵柳树! 更让他没有想到的是,洛神界的一位无上女帝,竟然重生在这棵柳树上。 于是… “叮!鉴于宿主的养成对象于绝境中重获新生,宿主受到反馈获得混沌体传承!” “叮!鉴于宿主的养成对象进化为草木精灵,宿主受到反馈获得至尊骨传承! “叮!鉴于宿主的养成对象蜕变为九天神女,宿主受到反馈突破到神王境界!” 多年以后,叶辰于神路尽头,俯视着芸芸 众生,心中不免有些感慨。 唉,本想好好养成而已,没想到一个不小心,我竟然成为了无上神帝! 一个震撼万界之物沦落凡尘转化为人。将亿万年来平静的暗流,掀起一股惊天骇浪!! 一个千古难得一见的废物体质,却拥有万古无人能及的惊天悟性。且看,他在这被人觊觎的世界里艰难的开辟一条新的觅道之路……在一个偶然的机遇下,云雾生认识了一个神秘杠爷(盗墓贼),使他这个本是天煞孤星命的人,在东鲁巫师墓中得到三部天书中的“人”字部天书,从而走上了一条惊险刺激的逆天改命之路。贵南鬼母地宫中的地下民族;神秘的藏地第一代赞普(藏王)的神墓;大沙漠魔鬼城下诡异的地下古城;昆仑山上远古时代的天域之城。都留下了他的足迹,在历经无数的艰难险阻之后,他和他的伙伴们终于找到了,天、地、人三部远古时代遗留下来的的天书。更是赢得了人生中真正的幸福。无数的惊险与刺激尽在此书……灵魂穿越的沈七夜附身于一个锦衣卫身上,随着调查一桩桩离奇案件,他深入江湖威震擂台,最终机缘巧合拜官得入朝堂,被却迫卷入了一场东宫太子位之争。一路上他遇到各人各事,惊绝一省的神秘杀手,恶名远扬的江湖魔女,千古有名的女才子,下山历练的剑道女第子,以及南国门阀世家的千金等等,她们与主角沈七夜间将会发生各种各样的离奇感人又有趣的故事。曾经的生死仇敌却同床共枕,门阀千金要与自己的临时保镖私奔,为救红颜知己的师妹他大闹一派山门公然抢婚,数次与己交锋的魔女师姐妹却是被迫委身于他,还要与天之骄子的敌国长公主明争暗斗!他这一路数不清的恩怨情仇,道不尽的是非因果,且看他如何一步步裂土封王,为“祸”一方!!! (女帝、单女主、撩粮、爽文) 你被女人套路过么? 林羽深有体会,只因系统拜师一位女帝,本以为抱上大腿,从此无忧无虑; 可谁能想到,某天他被带到一场婚礼上无数大能对他贺道:“恭喜公子迎娶女帝,祝二位百年好合,早生贵子!” 女帝:羽儿.哦不,夫君,你今日必须娶我! “你赠送师父淬体精华,返还深骨养液!” “你赠送师父冰寒之剑,返还诛魔剑!” “你赠送自己,返还一个女儿!” 一直靠【万倍返还】薅羊毛的林羽,争取做世间最强者,可没想到,薅着薅着,竟把自己也给送出去了。 女帝娇羞道:夫君,目之所及,皆是为师替你打的天下! 刚穿越到文娱世界,杨墨就发现自己身边躺了个一丝不挂的小网红! 外头的女星老婆更是疯狂敲门呵斥。 “杨墨!你给老娘滚出来!“ “有本事偷人,没胆量见我是不是!“ 于是乎,郁闷的杨墨发现,自己成了活生生的冤种! 小网红没碰到,还被高挑的女星老婆摆了一道! 唯一的目的就是离婚! 离婚后,激活了系统的杨墨,无奈成了当下炙手可热的腿精高冷女神林婉璇的私人男助理。 上班第一天,又将女上司看了个精光! 有了系统傍身,杨墨只能在“旧邀社区“注册了自己的ID”久邀秦先生“,从此开始了一发不可收拾的文娱巨擘之路!
世界上第一枚邮票 邮票网 第三轮生肖邮票 民居邮票 邮票吧 奥运邮票 邮票交易所 中国邮票价格表 民居邮票 龙邮票 第三轮生肖邮票 猴年邮票 十二生肖邮票 大龙邮票 邮票交易所 邮票价格 邮票价格 第三轮生肖邮票 奥运邮票 纪念邮票 鸡年邮票 民居邮票 邮票吧 中国邮票 邮票互动网 邮票吧 十二生肖邮票 邮票市场 民居邮票 纪念邮票 欧美群迅雷下载 南京文交所钱币邮票交易中心 邮票 龙邮票 十二生肖邮票 大龙邮票 邮票价格 邮票行情 邮票互动网 龙邮票 天生丹契完美吞噬之魔道封神万古第一神穿越成为魔法师异乡永眠最终序列大炎罗踏破青冥看守所笔记欧布奥特曼格斗进化神劫天罪曾以为天永恒不灭界脉天五彩凤尾冰火山河我有九种人格,个个都是大佬末武时代从武者开始刚到玄幻之开局签到神体金域藍城在魔法世界里还需要科学吗亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 【薇-電1322 8888 433】皇冠登3出租 【薇-電13228888433】皇冠登3出租 【薇-電13228888433】皇冠登3出租 【薇-電132-②⑧⑧⑧-8433】皇冠登3出租 【薇-電13228888433】皇冠登3出租 快连官网 - 上海曲德曲网络科技有限公司 Lets快连 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司