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
宅急送 浦东网点查询电话漳州百事快递电话号码多少宅急送官网客服电话张店区顺风电话张店区顺风电话号码郑州新密汇通快递公司电话号码张家口市国通快递电话宅急送官网客服电话章丘申通客服电话张家口赤城县电话张家界圆通派送员电话宅急送 浦东网点查询电话张家口国际快递电话张家界永定区物流电话宅急送官网客服电话张家口赤城县电话张家口市国通快递电话是多少张家界市申通电话张家界市申通电话郑州新密汇通快递公司电话漳州百事快递电话号码张家界市申通电话章丘申通客服电话郑州新密汇通快递电话张店区顺风电话号码漳州北斗百世快递电话张店区顺风电话只有电话怎么查的包裹郑州新密汇通快递电话号码张家口国际快递电话当幽蓝的火焰降临世界,世间所有的罪恶当得到审判。 PS:小说只是借助海贼世界故事背景再次创作,很多剧情并不根据原著走,很多情节也是我根据原著所做的推导,后期可能会偏向玄幻! 不喜勿喷!谢谢!随着怪异的天灾降临,世界各地出现了各种奇怪的现象。浓雾带来了人类的觉醒,动植物的进化,似乎一切都预示着新的纪元即将到来。 “既然一切不合心意,那就,重启这个时代好了。” [无女主+不圣母]简介:(无敌+签到+仙魔一体) 辰君宇穿越到一方玄幻世界,因为前身不知如何成了废体,但万幸获得了签到系统,开局在仙魔战场获得《仙魔录》与仙魔道体 天骄榜前签到,获得万年道心 镇妖塔前签到,获得《玄黄轮回剑典》 不知名山峰签到,太古圣地一座...... 不知过了多久有一座圣地成了这万界的第一势力 回首望着诸天万界之中,都流着在这世上有位无敌的剑客,没人能接的下他三剑。也流传着恶人榜上的第一恶人无恶不作,实力至上........ 女孩是个有异能的人,一周转变一种人格,但并非人格分裂,而是有三种人格有规律的转变。。 而且只要主人格需要,她们随时会占据她的身体。 从初三某个夜晚的一场梦开始,她具备了这种特异功能。女孩会遇到什么事?又会怎么去应对呢?真正的末日危机,藏在人性之中。没有因果报应,只有弱肉强食。 各方势力相互绞杀,人伦丧尽,魔兽横行,正道无光,人如草芥。 当正义的天平倾斜,我就是你的报应。 夜枫从走出孤儿院开始,便注定了自己的命运。 身负无边杀孽,只为天下太平。 【灵异、悬疑、惊悚、探险、宠物、系统、游戏、搞笑】 废弃的别墅,消失的山村,黑暗的血楼…… 人头蜘蛛,红衣厉鬼,浑身是手的怪物…… 在这个深夜的恐怖世界里,王尊稳如老狗,遇人先问娘,杀鬼必扬灰,万事只求一个安稳! 别人还恐惧在诡异怪谈中时,王尊在惊悚游戏世界里杀疯了。姜雨扬,男,22岁。在这个世界,他只是一名普通的袋鼠打工仔,但突然有一天,他莫名其妙地走进了另一个陌生的世界。 在这里,他是万民敬仰的罗汉爷爷,惩奸除恶,他又是一个卑鄙无耻的邪恶首领。 一个行走在光明与黑暗间的走私商人,是无情的屠夫,也是活人无数的神明。 他是无数矛盾的混合体,也是新世界的创造者。 姜雨扬:“我真没想弄这么大动静啊~” 我们是生活在一个多维的空间,现在所处的三维空间只是其中很小的一部分,其他空间到底隐藏着什么奥秘需要我们不断地探索。现代人的大脑开发只有10%,就连爱因斯坦的大脑使用率也只有15%。而古时人类大脑使用率是100%。有些事情不是你解释不了就认为不存在,那是因为你的大脑使用率太低了。特异功能的修炼过程也是在逐渐提高人类的大脑使用率的过程,当你的能力达到一定水平之后很多问题将迎刃而解。石小方是个很方正死板的人,说了不能妥协就是不能,说了不能少泡一个就是不能,一直以自己所能想到的各种无耻借口做着方正而死板的自己。但是现在的他很方,他只是个打算如方石一般横扫过人生这个终将有终点的大滑坡,怎么突然就告诉他,这个滑坡之下,是修真界这片汪洋大海呢? 俗世百年,我的钱呢?我的妞呢?我的七情六欲,你一片海就要我全丢了,去做你的定海神石?想得美呢吧老头子们! ﹝本书抖音号∶周少爷的刀,67104207116﹞ 人在江湖身不由己。他的刀轻易不能出鞘,出鞘就得死人,杀人如同吹灯,什么时候开刀噬血?只在一念间。
十方世界,我为地仙之祖 关于我被放逐到异世界的事 风之子于归 最强逆袭元素师 太空人冒险日记 怀兰 校园最强特工 六道仙尊 逍遥的呀,小神仙 重生之咪咪再续前缘 开局爆亏,反买垃圾股涨停 变成魔王也要拯救世界? 梦长城 德者居上 大苍纪 开局一个烧烤摊 夜将起 战神重出江湖 逍遥村医 道之往生咒 漳州百事快递电话号码多少钱 张家界圆通派送员电话号码 张家口市国通快递电话是多少 张家界市申通电话 漳州百事快递电话号码多少钱 漳州角美物流电话号码 章丘龙山申通快递电话 张家口德邦客服电话 漳州北斗百世快递电话 张家口国际快递电话 章丘申通客服电话 章丘龙山申通快递电话号码 郑州新密汇通快递电话 张家口赤城县电话 郑州新密汇通快递公司电话号码 张店区顺风电话号码 章丘龙山申通快递电话 漳州北斗百世快递电话 漳州百事快递电话号码 宅急送 浦东网点查询电话 张家界圆通派送员电话号码 宅急送官网客服电话 漳州百事快递电话号码多少 张家界永定区物流电话 张家口赤城县电话 郑州新密汇通快递电话 漳州北斗百世快递电话 漳州百事快递电话号码多少 漳州百事快递电话号码 漳州北斗百世快递电话 张店区顺风电话号码 张家界圆通派送员电话号码 沾益县ems快递电话 宅急送 浦东网点查询电话 只有电话怎么查的包裹 张店区顺风电话号码 沾益县ems快递电话 章丘龙山申通快递电话 郑州新密汇通快递电话 沾益县ems快递电话 张店区顺风电话号码 张家界的电话区号 郑州新密汇通快递公司电话 章丘龙山申通快递电话号码 张家界永定区物流电话 张家界圆通派送员电话号码 章丘申通客服电话 张店区顺风电话 郑州新密汇通快递电话号码 张家口市国通快递电话 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 重生85:财富人生 平凡人的人生路 赤星降临 地球篇天使降临 主角?掌中之物罢了 欧博官网 亚星管理平台 澳门葡京游戏官网 欧博官网 亚星游戏官网 张家界圆通派送员电话 沾益县ems快递电话 沾益县ems快递电话 郑州新密汇通快递公司电话 郑州新密汇通快递公司电话号码 郑州新密汇通快递电话 张家界永定区物流电话 张家界的电话区号 漳州百事快递电话号码多少钱 郑州新密汇通快递电话号码 章丘龙山申通快递电话号码 漳州北斗百世快递电话 张家口市国通快递电话 郑州新密汇通快递公司电话号码 漳州百事快递电话号码 张家界永定区物流电话 张家界永定区物流电话 漳州北斗百世快递电话 漳州角美物流电话号码 彰武邮政快递的电话 郑州新密汇通快递公司电话 只有电话怎么查的包裹 张家界市申通电话 沾益县ems快递电话 漳州百事快递电话号码多少 郑州新密汇通快递电话号码 张家界圆通派送员电话号码 漳州北斗百世快递电话 张家界市申通电话 漳州百事快递电话号码