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
《 忍ぶ雨》 歌词认模特歌词歌词 你来唱 我来跳歌曲good time 歌词泪水 雨 歌词《 忍ぶ雨》 歌词wensshen歌词歌词 你来唱 我来跳梅花朵朵开歌词完整版自从离别后ksc歌词昨天.今天.下雨天歌词歌词 你来唱 我来跳回家林志炫歌词昨天.今天.下雨天歌词因为有你的歌词杨钰莹自从离别后ksc歌词大班儿歌:长城像条长扁担歌词我曾经在你的世界 歌词我曾经在你的世界 歌词曾经付出多少努力歌词撸起袖子加油歌词常亮广场舞我曾经在你的世界 歌词梅花朵朵开歌词完整版的是我歌词倩女幽魂国语歌词张国荣美国国歌歌词及乐谱倩女幽魂国语歌词张国荣的是我歌词曾经付出多少努力歌词回家林志炫歌词江湖的心中有一条江,江湖给它取名为“湖”。自此,江不离湖,湖不离江。而江湖的心里,住着一片江湖!灵气突然的复苏,这世界强者为尊,贫富分化严重,主角只是出贫民窟的人,看看他一步步逆袭。 未知病毒的爆发,废土的出现,凶兽的智慧开始逐渐成熟!主角该怎么面对? 是拯救世界,还是毁灭世界? 当危机开始降临时,一个绝对不可能诞生的人能否打破这一局面!虚无与混沌交织后所诞生的究竟是希望还是绝望。 不过,绝望的概率比较大吧 (本书与任何神话体系只存在名词相同。请不要纠结于某一个地方,谢谢)一个强盛的王朝,在烈焰中轰然倒塌。覆巢之下,人们挣扎在未尽的余灰中。许多人扛起了复国的渴望。可是,汹汹而来的鬼蜮伎俩,却将乱局搅动得愈加波诡云谲。好在,大智大勇者的神机妙算,最终冲破了鬼魅的阴霾。然而,一桩被掩藏了数十年的王朝秘事,却始终裹挟在迷雾之中,如今,它更是幻化成一张正缓缓地张开的血盆大口,誓要将这破碎的王朝一口吞下。上古大陆,一位拥有先天全体的少年,因为一次意外,引得黑珠入体,从而导致元力全失,至此他失去了所有光彩,族人的陷害让他认识了师尊,在一个分身的教导下,少年披荆斩棘,过五关斩六将,一步步成为真正的强者...... 为了家族命运,少年踏上了独自修炼的征程;为了亲人,他被迫选择了自己不爱的人;为了爱人,他忍受了无数年的自责。 从一个小小的战士,逐步成长为天元大陆至高无上的古神,而最终,为了整个天元大陆,他却付出了所有......无数人类降临荒原大陆,成为领主! 每人获得一种初始随机兵种与一座英雄祭坛! 攻城略地,抵御怪潮,称霸无尽荒原! 方宇随机到了最无用的人族兵种......大夏人族。 “哈哈哈哈!我的兵种是黑暗骷髅,英雄是唤灵法师,我城里的怪比外面还多!” “还是没我的强,我的兵种是比蒙巨兽,强到没边!” 看着信息,方宇无奈摇头笑笑。 是啊,你们都挺厉害的。 不过嘛...... “大夏城从一方小城发展到了足以抗衡帝国的存在,那位叫做李世民的英灵功不可没啊!” “糟了!大家快撤!嬴政来了,这家伙一天到晚就想着统一荒原,再不走,箭雨就到脸上了!” “老子的思想遍布了整个大陆,大夏又出了位神阶圣人!这是继墨子、孔子之后的第三位圣人了啊!这还怎么玩啊?” “什么老子?靠!那是太上老君!快跑!” 那一日,万族震恐!原来最强种族还得是人族! 大夏人族!!!故事发生在西南某省城,以三个不同背景家庭的年轻人的主线,记述了他们为了自己和家庭而奋斗的故事。平淡的人生,其实就是最真实的生活。这三个家庭因为各种偶然的原因相识相知,一起经历了几十年的风雨岁月。本书记述了他们平凡而又多彩的人生,以此纪念逝去的岁月和见证过这一切的人们。。 人类图是女娲造人之际留存的一部秘籍,其中用图的方式记载着造人的秘密。中华大地,唯有诸葛明这位蓬莱岛上仙知晓人类图秘密。诸葛明的第108代传世弟子——东方仙人预感人间将引发一场浩劫,唯有通过人类图集结的五位使者可以拯救人间!于是将人类图心法撰写成《人类图秘籍》,传授于他的爱徒——火显使者,并要他完成与土生使者、金显使者、水映使者和木射使者的集结联盟,实现拯救苍生的重任。不料,火显使者的师兄孤独厉心生怨恨,集结邪恶势力争夺人类图,破坏五位使者的联盟! 与孤独厉的交战中,五位使者经历了灵魂转世,分别投生于中国的现代家庭,化身为冯南熠、李中域、郑西鎏、孙北泉、张东梨。但重新转世的五人早已忘记之前的约定,其独有的天赋也被各自所在的家庭和学校严重制约! 为重新唤醒五人,东方仙人化身为不同角色,让五人重新找回自己,实现灵魂使命!最终,五人共聚五台山,合力成为新新人类,铲除邪恶势力,完成了拯救世界的任务!欢笑和悲伤,遗憾和期盼,都将留在这座城市。真不是本人经历。
对话日常 妄天轮 羽生晴也想过平淡生活 震惊,女帝套路我师徒恋 五界战乱:人间乱 伪神与混沌末日 我有最强神级天赋抽奖系统 末世降临:打工人崛起! 诛神武 元墟行者 清除 回忆中的从前 大明极品赘婿 赶尸人的诅咒 星域神启 嘘,你背后有鬼神 踏行 音师 一科独尊 这就是,现实 天上太阳红艳艳歌词 天生有我好听的歌词 大班儿歌:长城像条长扁担歌词 泪水 雨 歌词 天上太阳红艳艳歌词 董贞相思引歌词背景 大班儿歌:长城像条长扁担歌词 十年广东爱情故事歌词 美国国歌歌词及乐谱 可以唷的歌词 魔法高校劣等生ed歌词 魔法高校劣等生ed歌词 叱咤红人直译歌词 天生有我好听的歌词 《 忍ぶ雨》 歌词 泪水 雨 歌词 说书娃娃歌词 美国国歌歌词及乐谱 万树繁花lrc歌词下载 歌词 你来唱 我来跳 天生有我好听的歌词 因为有你的歌词杨钰莹 万树繁花lrc歌词下载 昨天.今天.下雨天歌词 自从离别后ksc歌词 叱咤红人直译歌词 美国国歌歌词及乐谱 认模特歌词 万树繁花lrc歌词下载 美国国歌歌词及乐谱 泪水 雨 歌词 程源的诚信歌词 歌曲good time 歌词 《 忍ぶ雨》 歌词 的是我歌词 泪水 雨 歌词 歌曲good time 歌词 大班儿歌:长城像条长扁担歌词 叱咤红人直译歌词 因为有你的歌词杨钰莹 倩女幽魂国语歌词张国荣 可以唷的歌词 保卫黄河第一句歌词为 说书娃娃歌词 昨天.今天.下雨天歌词 程源的诚信歌词 魔法高校劣等生ed歌词 倩女幽魂国语歌词张国荣 叱咤红人直译歌词 wensshen歌词 亚星游戏官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 六子传奇 异界骑士系统 仙海逆程 神奇宝贝之布卡 我在阳间当阴使 亚星官网 欧博游戏官网 欧博官网 亚星官网 AG真人 认模特歌词 美国国歌歌词及乐谱 曾经付出多少努力歌词 《 忍ぶ雨》 歌词 泪水 雨 歌词 大班儿歌:长城像条长扁担歌词 认模特歌词 十年广东爱情故事歌词 魔法高校劣等生ed歌词 程源的诚信歌词 美国国歌歌词及乐谱 wensshen歌词 歌词 你来唱 我来跳 歌词 你来唱 我来跳 董贞相思引歌词背景 的是我歌词 万树繁花lrc歌词下载 天上太阳红艳艳歌词 梅花朵朵开歌词完整版 保卫黄河第一句歌词为 倩女幽魂国语歌词张国荣 wensshen歌词 万树繁花lrc歌词下载 歌曲good time 歌词 说书娃娃歌词 昨天.今天.下雨天歌词 天上太阳红艳艳歌词 问君 是否 知多少 歌词 《 忍ぶ雨》 歌词 《 忍ぶ雨》 歌词