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
车间 hvac 价格24座中巴客车价格表hvac 价格泥盆价格软面抄价格车间 hvac 价格微商林夕梦内衣代理价格表hvac 价格midori traveler s notebook价格普无.邮票市场价格河南平顶山救护车出租价格车间 hvac 价格五原县瓜子价格2015钕铁硼价格走势hvac 价格普无.邮票市场价格一次性火柴价格名爵牌价格名爵牌价格纷赋价格隔离服价格名爵牌价格midori traveler s notebook价格风帆蓄电池6qa105价格软面抄价格自走式喷杆喷雾机价格泥盆价格微机控制电液伺服万能试验机价格浙江鳗鱼苗价格五原县瓜子价格世界异变,天灾来临,全民穿越末日游戏! 恐怖异兽、荒野沼泽、诡异遗迹,危机无处不在! 人类只能依靠庇护所艰难生存,接受一轮又一轮的天灾洗礼! 幸好,路岩觉醒了末日生存系统,他可以无限分解制造生存必需品、无限升级庇护所! 【钢铁】+【木材】合成【钢斧】! 【石英砂】+【纯碱】+【树脂】合成【防弹玻璃】! 【合金】+【微型能源】+【变异兽大脑】合成【兽型守卫】! 当所有人都还在为生存而艰难奋斗时,路岩已经携带一身超时代神装横行荒野! “路神的庇护所是废土中最安全的地方!” “那里的城墙厚达百米,那里的资源用之不尽!那里是末日荒野中的唯一乐土!” “有生之年,我想进入路神的庇护所,哪怕只是看一眼!” 古老的传说,神秘的田家井! 一声巨响,一片残垣断壁,见证了一段血腥的历史。 五百多年后的他从残破古井中进入一处空间裂隙,邂逅元末枭雄陈友谅之女陈飞飞,揭开了一段尘封的历史。他加入华夏国安八局并屡立奇功,战功赫赫的女友为了华夏北斗系统被CIA羞辱,从此他上碧落下黄泉,只为……武之一途,逆则进;情之一道,终难舍。帝路身孤,传承已断,真武浩劫,吾当身守。魔威滚滚,生灵涂炭;一丝生机,踏天而行。人魔遗迹,破帝成神;七州同力,护我山河。三界来袭,不归鼎去;天外死战,以待灵神。被极东王国学院院长,捡回抚养长大的陈仒。没有能力而被抛弃,成为图书馆里员。 在平凡的度过四年后,一个小偷闯入图书馆把他杀害。本应已死的他,却诡异复活。 在被人一系列的设计后,卷入王国的权力斗争,以及和邻国的冲突之中。 期间失去了最近亲之人,同时卷入了更大的漩涡之中灵异事件,着火了,别人却看不见。只能自己看见男护士转生异世界,竟然被职业评定选择成了最稀有职业-男性圣职者?本来以为可以在异界享受人生,迎娶公主,走上巅峰,没想到卷王居然就在我身边?内卷什么的之前已经受够了!为了对抗内卷,全都点了治愈,男圣职者平凡而又非凡的异世界生活,从现在开始!重生先天人族,本以为是人生巅峰,哪知道却要面临重重危机,在妖族的虎视眈眈下,陆丰凭借自己的努力,和系统给予的机会, 定人族三祖,册三皇封五帝,立人道圣人,对抗天庭和鸿钧,以及强大的天道—— 陆丰:“巫妖量劫来临之前,我要让整个洪荒,都在人族的铁拳下颤抖……”一本关于中世纪风帆海战时代的传奇冒险记录,冒险与机遇并存,黄金与自由的权衡。 书友群7306644442,可以加进来一起讨论剧情,哪里觉得不合理也可以一起讨论,是会看读者眼色行事的机智(憨批)作者意外穿越,沦为一介整日酗酒打媳妇的落魄无用书生。 眼看家徒四壁无粮可吃,身为男人的徐修,毅然决然扛起养家大任。 原本徐修没有什么大志向,只想在这古代过好他的小日子,赚钱、买粮、哄媳妇... 但奈何,世事难料,当权贵欺压,祸及家人之际,徐修怒而拔刀。 也就是从拔刀那刻,徐修便踏上成为一朝国士之路。 入京都,斗诗百人冠满京城,金銮殿上七步成诗,平匪乱,驱蛮夷…… 一路艰辛走来,徐修之名已然名震天下。 但又有几人能知,徐修就想赚钱、买粮、哄媳妇。逗比男主欢乐多,沙雕伙伴凑一窝,热血什么的完全不存在,苟才是王道
游历散记 我愿做你的梦境守护神 梦回三国五丈原 南斗伏妖录 苍茫铭主 和鬼谈恋爱的凶宅试睡员 迫降大西洋 界临天下 我不是李剑 万古逆苍穹 异变灵界 一柄竹剑征服世界 叶飞扬 沧桑百载重终是一场大梦 我家的末世少女 重生之我是隐士高人 宗门养成:我的师父超佛系 惊魂过山车 重历战争年代 三国:做卧底,被董卓偷听心声 五菱10座校车价格 心羡护肤品价格 一次性火柴价格 名爵牌价格 五菱10座校车价格 香山瓜子礼盒价格 水旱打药机后桥价格 黑谷9度干爽酒价格多少 自走式喷杆喷雾机价格 五原县瓜子价格 midori traveler s notebook价格 乐陵宾馆价格在50以下 风帆蓄电池6qa105价格 普无.邮票市场价格 jackdaniels打火机价格 软面抄价格 水旱打药机后桥价格 自走式喷杆喷雾机价格 隔离服价格 车间 hvac 价格 心羡护肤品价格 hvac 价格 24座中巴客车价格表 2015钕铁硼价格走势 普无.邮票市场价格 风帆蓄电池6qa105价格 自走式喷杆喷雾机价格 24座中巴客车价格表 隔离服价格 自走式喷杆喷雾机价格 软面抄价格 心羡护肤品价格 泥盆价格 车间 hvac 价格 微机控制电液伺服万能试验机价格 软面抄价格 荣耀6 在手机实体店的价格 水旱打药机后桥价格 风帆蓄电池6qa105价格 荣耀6 在手机实体店的价格 软面抄价格 天拖1104拖拉机价格 纷赋价格 乐陵宾馆价格在50以下 2015钕铁硼价格走势 心羡护肤品价格 midori traveler s notebook价格 泥盆价格 浙江鳗鱼苗价格 微商林夕梦内衣代理价格表 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 民间轶闻往事 恶魔之主的复苏 云巡四洲 隋逆 我与阿狸的故事 皇冠登3出租 澳门葡京游戏官网 澳门葡京官网 皇冠登3出租 亚星官网 河南平顶山救护车出租价格 隔离服价格 jackdaniels打火机价格 hvac 价格 车间 hvac 价格 五菱10座校车价格 天拖1104拖拉机价格 一次性火柴价格 自走式喷杆喷雾机价格 微机控制电液伺服万能试验机价格 自走式喷杆喷雾机价格 河南平顶山救护车出租价格 香山瓜子礼盒价格 纷赋价格 浙江鳗鱼苗价格 隔离服价格 乐陵宾馆价格在50以下 车间 hvac 价格 普无.邮票市场价格 五原县瓜子价格 天拖1104拖拉机价格 泥盆价格 24座中巴客车价格表 微机控制电液伺服万能试验机价格 软面抄价格 名爵牌价格 泥盆价格 乐陵宾馆价格在50以下 名爵牌价格 心羡护肤品价格