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
霸气说说加图片大全2015最新版穷字分解图片大全手机壁纸大全紫色高清图片唯美图片大全图片大全图片背包女生背影图片大全变态动画图片大全集霸气说说加图片大全2015最新版情侣图片唯美带字大图片头像图片大全可爱图片手机壁纸大全紫色高清图片唯美图片大全图片大全图片搞怪猪睡觉图片大全高清图片萌萌哒头像男生动漫头像大全可爱图片大全彩色漫画女生头像简笔画图片大全图片手机壁纸大全紫色高清图片唯美图片大全图片大全图片高清幽默男生头像图片大全彩色漫画女生头像简笔画图片大全图片悲伤哭泣手写图片大全高清图片萌萌哒头像男生动漫头像大全可爱图片大全情侣纹身图片高清手机壁纸高清图片大全会动的接吻聊天表情图片大全会动的接吻聊天表情图片大全安静睡觉图片唯美图片带字图片大全情人情侣图片大全集会动的接吻聊天表情图片大全搞怪猪睡觉图片大全埃菲尔塔图片大全变态动画图片大全集求勾头像图片大全丘比龙起床图片大全埃菲尔塔图片大全安静睡觉图片唯美图片带字图片大全高清幽默男生头像图片大全苏晨在穿越后,掌握了一个模拟系统,它可以模拟万界人生,当然要抽卡的(而且和米xx一样抠门连个福利都不带)一觉醒来陈文发现自己穿越了!然而青梅竹马准未婚妻因为家中负债,被逼嫁给隔壁地主!为了挽回心爱的她,为了做一个富贵闲人,陈文不得不整出一个又一个的小发明,经商致富,种田发展,一步步做大做强,再创辉煌!天呐!一招大败鸿钧老祖!与大道大战九天九夜未分胜负的神秘人,竟然只是那少年的一道分身!   林凡穿越后荒古时代,天地灵力匮乏,身为五行霸体的他,竟然被人夺舍本源,沦为将死废人。   好在万念俱灰之际,他继承了帝尊传承意志。   从此林凡虽为一介凡体,欲可逆天崛起,纵横八荒,九天十地无敌手!   十万分身为我修炼,修为一日万里。   神通秘术晦涩难懂,我瞬间透彻!   天骄圣子,我一指可灭!   大帝古皇,覆手镇压!   洪荒大道,一念代之! 他们说,如果做了神仙就好了,因为那样可以无忧无虑的,真的吗?   天蓬,你喜欢现在的生活吗?整天活在生死之中!   喜欢……是什么意思?   天蓬,你知道自己犯了什么罪吗?   知道,因我爱上了我所爱的人!   贬你入凡,散你修为,可服?   我……   我虽然是头猪,但我,不,任,你,们,宰!   为什么要骗我?为什么?   因为你傻啊!   大圣,此去欲何?   踏南天,碎凌霄   若一去不回……   便一去一回!   天蓬,我们终不能改变那个开始,何不忘了那个结局?   负尽千重罪,炼就不死心   现在我明白了,说我调戏仙娥,犯下天条,贬下凡尘,散我修为,要我了去凡心,我!不!服!   说俺大闹天宫,妖性大发,顽心不改,困我百年,要我戴上紧箍,像条狗一样顺从你们,我!不!服!   卷帘,当神仙痛快还是这闹天宫痛快?   三藏,倘若俺老孙一去不回,待到来生再吃你的肉! 生我何用?不能欢笑,灭我何用?不减狂骄。 这个天地,我来过,我奋战过,我深爱过,我,不在乎这结局!                        明朝是一个非常神奇的朝代,神奇在皇帝千奇百怪,神奇在亡国特别突然,国内民不聊生、起义不断,边境后金崛起,不断袭扰,朝中党争不断,将门独大。思宗看似勤俭为民,实则多疑擅杀忠臣,自破长城。悲惨的世界有一群执着的人 《大美宝鸡》是严肃文学作家勤静忍(本名强飞龙)创作的游记散文集,本游记散文集?收录了多篇描写宝鸡大好河山与名胜古迹的美文,每一篇美文的写法与风格都不尽相同。 人们常说一花一世界,一叶一菩提,宝鸡是中国的缩影,一个小小的宝鸡便能窥见中国的全貌。姜子牙离世之后,打神鞭和道法之意,让他流于后人,世上一并妖魔也随着天道封神之后隐秘下来,纷纷融入凡间,混迹在人类之中生存。 而世间时间推移百年千年,在人世之中隐藏自己的身份,而道法和这些妖魔鬼怪都也被世人作为饭后闲谈而已,当作故事流传至今。 而姜子牙的后人也就是道法继承者,在千年里还是和妖魔进行抗争,在不被世人所知的情况下斩杀驱除于世。 直到【中历】黄帝纪年4695年,也就是现代的公元2004年,公历闰年,科技发达,世人也都认为妖魔只是那些歪理邪说诡异故事。 “你信神么?”。 “不信就跟我走吧”。架空历史+穿越异界+女帝+多女主 他与网恋小女友打电话,突发意外,离奇穿越异界,却遇到成为女帝的网恋小女友,这期间到底发生了什么? 他落在一张床上,可这却是女帝的凤榻,他将如何抉择? 他舌战朝堂群臣,可女帝却不是很满意,他将如何应对? 他制作现代的物品,可女帝不止想要一样,他将如何满足? 他征伐大陆永不歇,可女帝仍旧保持否认,他将如何证明? 他功高盖主欲娶帝,但女帝最后如何选择,他最后能否娶? 一位新时代青年在异界的成帝之路,他将如何一步步登顶帝位与女帝同起同坐。 让我们拭目以待吧!天道俯视众生,凝聚世间万法打造九重天阙,与之共鸣者可获天赐命魂,踏上修行登天之路。 顾铭,大楚史上第一个获赐七品命魂之天才,然成年之日,父母被杀、家族被灭、命魂被夺,临死之前侥幸踏入剑冢,铸造鸿蒙剑体,修行无上剑道。两年之后,顾铭离开剑冢重返世间,踏上剑道至尊之路,一剑可斩仇敌、可破九天、可镇诸天万域。浩瀚的宇宙,无垠的星空,时光凝固 千古不变,冰冷与黑喑并存,漆黑中充斥着孤独,星河镶嵌虚空闪烁,宛如一颗颗钻石滚落黑布,      幽冷的宇宙中,一颗红色星球悬浮而立,苍凉而枯寂,悄无声息的转动,天穹暗淡无光,随风而扬的沙尘乱而起,冰霜覆盖着无数的陨石撞击坑 尽显苍凉,远方一座雄伟山体显现充满震撼,让人望之一眼便感到无尽沧桑,
直播:北凉说书,周姐打赏 我未曾扑向光明 弑爱如归 武逆炼神 我们有一个反鬼计划 天元之门 寒门忆梅 玄荒武帝 圣源之界 我真没想统一三国 念念紫薇星 修炼一道 轮环 耐普罗德之书 九天神脉 乡村玄学大师 斗破八荒 万界收藏家 如果有重开 江湖,如梦楼 秋天伤感的图片大全2015款 高清手机壁纸女欧美图片大全唯美伤感 情侣纹身图片高清手机壁纸高清图片大全 变态动画图片大全集 秋天伤感的图片大全2015款 全可爱动漫图片大全图片大全集 情侣纹身图片高清手机壁纸高清图片大全 创意风铃图片大全 求勾头像图片大全 高清唯美女二次元图片大全 搞怪猪睡觉图片大全 高中暖心男生漫画图片大全 爱社会的漫画图片大全 高清手机壁纸女欧美图片大全唯美伤感 霸气说说加图片大全2015最新版 变态动画图片大全集 情侣雨伞图片大全图片大全图片 求勾头像图片大全 情头双人两张全身背影图片大全 手机壁纸大全紫色高清图片唯美图片大全图片大全图片 高清手机壁纸女欧美图片大全唯美伤感 悲伤哭泣手写图片大全 穷字分解图片大全 彩色漫画女生头像简笔画图片大全图片 高清图片萌萌哒头像男生动漫头像大全可爱图片大全 爱社会的漫画图片大全 求勾头像图片大全 穷字分解图片大全 情头双人两张全身背影图片大全 求勾头像图片大全 变态动画图片大全集 真人早上好图片大全下载 背包女生背影图片大全 霸气说说加图片大全2015最新版 埃菲尔塔图片大全 变态动画图片大全集 背包女生背影图片大全 情侣纹身图片高清手机壁纸高清图片大全 爱社会的漫画图片大全 悲伤哭泣手写图片大全 丘比龙起床图片大全 高清唯美女二次元图片大全 霸气表情小孩图片大全 情侣雨伞图片大全图片大全图片 彩色漫画女生头像简笔画图片大全图片 高清手机壁纸女欧美图片大全唯美伤感 高中暖心男生漫画图片大全 丘比龙起床图片大全 爱社会的漫画图片大全 情侣图片唯美带字大图片头像图片大全可爱图片 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 雨中困兽 史上第一败家子 精灵:这只卡比兽有亿点大 道非身外之诡事 九苍异能传 AG真人 亚星管理平台 亚星游戏官网 AG真人 百家乐官网 高中男生全身照片大全图片大全图片大全 全可爱动漫图片大全图片大全集 手机壁纸大全紫色高清图片唯美图片大全图片大全图片 创意风铃图片大全 全可爱动漫图片大全图片大全集 情侣纹身图片高清手机壁纸高清图片大全 手机壁纸大全紫色高清图片唯美图片大全图片大全图片 穷字分解图片大全 真人早上好图片大全下载 真人早上好图片大全下载 全可爱动漫图片大全图片大全集 全可爱动漫图片大全图片大全集 情头双人两张全身背影图片大全 霸气说说加图片大全2015最新版 埃菲尔塔图片大全 彩色漫画女生头像简笔画图片大全图片 丘比龙起床图片大全 情侣图片唯美带字大图片头像图片大全可爱图片 安静睡觉图片唯美图片带字图片大全 高清图片萌萌哒头像男生动漫头像大全可爱图片大全 情侣纹身图片高清手机壁纸高清图片大全 彩色漫画女生头像简笔画图片大全图片 穷字分解图片大全 高清幽默男生头像图片大全 彩色漫画女生头像简笔画图片大全图片 霸气表情小孩图片大全 求勾头像图片大全 全可爱动漫图片大全图片大全集 情人情侣图片大全集 情头双人两张全身背影图片大全