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
小米九号平衡车怎样下载软件头像弄成漫画的软件广告企业管理系统软件显示有毒照片查软件美日对讲机调频软件小米九号平衡车怎样下载软件视频遮挡手机软件广告企业管理系统软件显示有毒cadreader软件红旗超市管理软件ps软件在线版广告企业管理系统软件显示有毒佳能打印一寸照片软件ps软件在线版制作通讯的软件下载红旗超市管理软件指令机器人软件下载苹果手机没越狱虚拟定位软件苹果手机没越狱虚拟定位软件浏览ct软件带符号的字体软件苹果手机没越狱虚拟定位软件cadreader软件录制电脑鼠标键盘软件最好用手机相机软件是什么软件迷你cad看图软件如何测量最好用手机相机软件是什么软件录制电脑鼠标键盘软件浏览ct软件佳能打印一寸照片软件行者,走遍天地间,只为寻求众生存在的真正意义;为求一缕光明和一线生机。魔猴王擎天乃魔界之王、毁灭之王。血红魔眼,乌黑毛发蜘蛛猴血统的猴族传奇角色,来源擎国大陆,擎皇第九子。随故事发展有着形态多变与毁天灭世的武功,叱咤风云,统一整个魔界。 为想得到龙族鼻祖烛龙的力量,与其在众界中开战九天九夜,随后烛龙一爪将他打入深渊。擎天用尽所有力量还是死于非命,转世到一神秘世界大陆,此大陆名为“玄天大陆” 此界每人都有着战魂和属性技能,是修炼法则之界。这也有关于魔猴王擎天的传说。擎天转世来到此界,武功与世界观不符凡体战魂便一无是处,后在此界发展摄影兼业余小说家行业过着平凡生活。 擎天前世记忆会隐约想起便写作成书,后被商家看中提出合作。擎天带兄弟梵一同上路。中途遇飞机坠毁而亡。在冥界对立大闹冥府。冥王得知拿下且夺走等人灵魂,让他们成为鬼差终身为冥界效力。 成为鬼差的擎天得到冥界阴气,战魂化冥魂,前世实力也一一开发。最后找到烛龙烛九阴,再次开启腥风血雨的大战。赵风穿越秦朝成为了始皇帝的第七子,嬴子歌! 原以为远离咸阳便能躲避灾祸,但赵高却找上门,好在系统如愿开启。 【神选一:接受始皇召令,卸下兵权,立即启程返回咸阳。】 【神选二:拒接始皇召令,立刻起兵,自立为王!】 【神选三:接受始皇召令,立刻回都,向始皇索要太子位!】 面对选择,嬴子歌选择了去向嬴政要太子之位。 至此,暴揍胡亥、疯斩徐福、莽破匈奴、凶伏百越..... 蒙恬:报始皇帝陛下,太子殿下率兵诛杀了匈奴二十万。 嬴政:...... 章邯:报始皇帝陛下,太子殿下已经诛杀了六国叛徒,这是刘邦与项羽的人头。 嬴政:...... 秦煜魂穿大唐,激活了个说书系统,却没想到开局任务就说【长生诀】。 秦煜:在大唐说长生诀?系统你怕不是嫌我死的太慢!你咋不叫我去讲玄武门之变? 系统:那就讲玄武门之变,要么现在死! 秦煜:我也不是怕死,就是爱讲玄武门之变! 李二:听个书,结果听到揭秘玄武门之变!这厮当真是不怕死呀   李暮穿梭了异界,穿梭到一修仙天地,变成一个采矿的奴隶。跟他来的,有一灵塔。但是整体天地也变更了。......一位非流派宗派的修仙者,一不同的修仙天地。一个叫林凡的人,重生到了太上老君的道童和天庭上的人交好关系,与玉皇大帝交友,认孙悟空做大哥,最后逆袭成王,如今看不起我,我现在必让你高攀不起姜凌天身处娘胎中,听到自己被人扰乱天命,出生会是个没长相,没资质的路人时,激活了无限修改系统! 系统只有一个功能,修改! 体质废柴?修改!叮!获得万古道体! 气运超垃圾?修改!叮!获得诸天万界永生庇护! 功法等级太低了,修改!叮!获得太上混沌道经! 颜值不行?修改!于是,世上多了一位亘古难遇,万古第一的帅哥……一切无形皆可化体,一切有形皆含仙性,天道不排万物,仙者不斥万灵。万物顺应天道者本应成仙,然而,猎仙人的宿命就是将一切成仙之人和成仙之物尽皆斩于剑下! 天地初始,孕育造化之九塔,镇天地之混沌,衍天道之灵,构筑万界秩序,演化万界生灵。   时光飞逝,流转亿万年岁月,九塔蒙尘。   都市发展迅速,进入科技新时代,城市高楼林立,灯火通明,一位名为纪十安的少年正在密林中举起了他的弓箭。。。。。大盛帝国边境一时间狼烟四起,烽火连天。镇远府陷落,敌军的铁骑逼近上京。内阁首辅之子郭曦受封征北将军,率军支援上京防线,面对危急的局势献出妙计,亲率军队大败北乾。 但随着他的凯旋而归,一场场政治风暴也随之而来。 自此之后,一代军事天骄崛起,他八出奇计,淹司城,烧井阳,千里奔袭包抄敌军……他用一次次的碾压的胜利剿灭五国,告诉侵略者:胆犯大盛者,虽远必诛。 最终,他踩着尸山血海与成林枯骨,用着阴谋诡计一步步走向了皇位,成就了一代传奇战神。(非穿越,非重生)
我们有一个反鬼计划 拳愿 娱乐:欠命音乐妖孽 小玄子与方苏昕 夸赞系统就能变强 暗黑战灵师 人云亦允 奴隶少年与傲娇公主那些事 老天爷赐给我的女朋友 重回1999当医生 诡计多端小女友 无有善 换赎 亡灵之友 紫玉仙缘 妙眼小村医 重生:人在王朝,开局种田致富 踏行 阴命捞尸人 清水河记忆 视频遮挡手机软件 广告企业管理系统软件显示有毒 淘宝图片删除软件 corldrowx3软件下载 视频遮挡手机软件 用友软件客户信息确认码 淘宝图片删除软件 照片查软件 指令机器人软件下载 最好用手机相机软件是什么软件 红旗超市管理软件 红旗超市管理软件 cadreader软件 广告企业管理系统软件显示有毒 头像弄成漫画的软件 corldrowx3软件下载 破解软件加33865401 指令机器人软件下载 佳能打印一寸照片软件 什么软件下载游戏有资源 广告企业管理系统软件显示有毒 迷你cad看图软件如何测量 佳能打印一寸照片软件 自拍神器辅助软件下载 制作通讯的软件下载 cadreader软件 指令机器人软件下载 加马赛克软件 免费版 佳能打印一寸照片软件 指令机器人软件下载 corldrowx3软件下载 小米九号平衡车怎样下载软件 美颜相机在线软件哪个好用 头像弄成漫画的软件 最新三维贴图软件 录制电脑鼠标键盘软件 美颜相机在线软件哪个好用 淘宝图片删除软件 cadreader软件 迷你cad看图软件如何测量 录制电脑鼠标键盘软件 幻灯片软件下载2007 自拍神器辅助软件下载 用友软件客户信息确认码 ps软件在线版 淘宝图片删除软件 最新三维贴图软件 最好用手机相机软件是什么软件 corldrowx3软件下载 视频遮挡手机软件 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 小公爵的意外玫瑰情人 混沌魂则 封坛惊鸿 黄梁元年 谋族篡位 百度 百度 百度 百度 百度 用友软件客户信息确认码 录制电脑鼠标键盘软件 自拍神器辅助软件下载 浏览ct软件 带符号的字体软件 淘宝图片删除软件 幻灯片软件下载2007 高清编辑视频软件 头像弄成漫画的软件 带符号的字体软件 幻灯片软件下载2007 小米九号平衡车怎样下载软件 照片查软件 制作通讯的软件下载 美颜相机在线软件哪个好用 什么软件下载游戏有资源 美日对讲机调频软件 视频遮挡手机软件 用友软件客户信息确认码 录制电脑鼠标键盘软件 最新三维贴图软件 苹果手机没越狱虚拟定位软件 红旗超市管理软件 cadreader软件 带符号的字体软件 最新三维贴图软件 制作通讯的软件下载 带符号的字体软件 什么软件下载游戏有资源 广告企业管理系统软件显示有毒 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网