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
调教游戏免费手机版下载地址大型h游戏官网动画美人鱼小游戏动画美人鱼小游戏大全集调戏性奴游戏调教游戏免费手机版下载地址调教游戏都有什么动画美人鱼小游戏顶级调教游戏调教小女仆游戏下载地址调教女学生小游戏在线动画美人鱼小游戏调教游戏的调教女学生小游戏在线动画美人鱼小游戏大全调教小女仆游戏下载地址动画霸王龙吃人的游戏调整美女2游戏调戏性奴游戏大型励志游戏大全2015大型 sm 游戏调整美女2游戏顶级调教游戏大型大卡车停车游戏下载调戏日本女佣小游戏大型大卡车停车游戏调戏日本女佣小游戏大型大卡车停车游戏下载大型励志游戏大全2015调教游戏的Eyolu伊由路音曲文艺《花都明日A 1》《野菊花》《音曲集1、2》《写实录》…… 音乐致在感动与让人聪明,我不喜欢悲剧、恶剧。积极着真善、真相、真理,实现梦想,追求幸福,最有意义地生存!我乃计都星下凡,先天便拥有阴阳眼。未出生就遭人算计,不足月被人挖出母体,先天有缺,易招恶鬼,命格犯煞,注定活不过百日。在奄奄一息之际,幸得牛四海相救,从此跟随其生活在一起,耳濡目染,终成一方守界人,自此可与神灵交流,可随意出入地府,逆天改命!终于从七笔村走了出来!步入残忍的江湖,我四处打听七笔村的秘密,逐渐陷入一场大局,我是下棋的还是棋子?叶辰生于诸神黄昏时代,神格散落大地,人人皆可成为神! 本是天之骄子的叶辰,却因自身神界内的信徒皆是无法修炼的人类,从而惨遭退学…… 幸好,他还觉醒了超级科技系统! 于是,当所有人都在钻研各种魔法,信奉个人之勇的时候。 他的信徒却凭借科技的飞速发展,创造了机械飞升的道路。 二向箔、光速飞船、反物质导弹、基因进化、人工智能、计算机破解一切魔法公式……赵匡胤从一介无名小卒,历经高平之战、清流关之战等大小战事淬炼,成为后周殿前都点检,执掌殿前司兵权。五代十国最英明神武的帝王柴荣正值三十九岁壮年,不幸陨落。主少国疑之际,赵匡胤陈桥兵变,黄袍加身,建国大宋。世间有一个灰色的地带,人鬼交易,血腥残忍 混乱的往事,不堪的生意,布好的棋局 人们常说,与恶人战斗要比恶人更恶 午夜钟声响起,黑白颠倒 “年轻”的宗主究竟隐藏了怎样的惊天秘密 二十年前消失的禁术,自我血祭的亲人坚守的是善还是恶 断头的鬼新娘为何从不哭泣 她背负一切,是怜悯还是伪装 这究竟是白对黑还是黑吃黑 难凉热血,平衡阴阳,逆天改命 生死博弈,多重视角,全新的灵异世界,见证不一样的故事 我叫叶轩,别人武魂觉醒不是动物就是武器。 我不一般,我觉醒了个人!上一世命运坎坷被他人所制,沦为替死鬼,机缘之下借体重生,这一世要为自己而活,追寻武道巅峰,成就一代王者 天涯明月刀ol,多少年的青春,虽然A了,也想留点美好的回忆【叮,您的神级搞钱系统已激活!】 伴随着系统的提升声,李凡终于明白了人生的真谛:那就是拼命的搞钱! 李凡借助系统给予的能力,卖配方、开面馆、创业投资一条龙。 秘制水煮肉片,鲜美嫩辣! 天外香炸鸡腿,外酥里嫩! 神级土豆牛腩,酱香浓韵! 除了各种自创顶级菜品外,还有蒸羊羔、蒸熊掌、蒸鹿茸、烧花鸭、烧雏鸡、烧子鹅、卤煮咸鸭、酱鸡、腊肉、松花、小肚儿、晾肉、香肠……等绝味厨艺! 从面馆开始,李凡创业后倚靠着无数神级配方在美食界横行霸道、平步青云的故事拉开序幕……
天命葬师 虚面之影:主世界 奥特曼之圣士传说 双苼 师姐请自重 异世界气味图书馆 重生之我是魔族大少爷 捡到一个神奇手机 光厘 新系星尘 江海策 祖谱能穿越 奇幻:我继承了九州神明鼎 全能者之双生者 田畯野老 蓝灵沐神 我苟在末世 全球诡异:我的技能有亿点多 赤星降临 南宫传奇 大型大卡车停车游戏大全 调教游戏 的视频 动画霸王龙吃人的游戏 调戏性奴游戏 大型插卡游戏大全 大型大卡车停车游戏大全 动画霸王龙吃人的游戏 调教游戏 的视频 大型大卡车停车游戏 调教游戏 的视频网站 钉子的游戏怎么玩 钉子的游戏怎么玩 大型会议小游戏 调教日本女佣小游戏 调教游戏免费手机版下载地址 调戏性奴游戏 叠叠高小游戏大全 大型插卡游戏大全 大型 sm 游戏有哪些 动画美人鱼小游戏 调教日本女佣小游戏 动画美人鱼小游戏 大型 sm 游戏有哪些 调整美女2游戏 调教小女仆游戏下载地址 大型会议小游戏 大型插卡游戏大全 大型h游戏官网 大型 sm 游戏有哪些 大型大卡车停车游戏 调戏性奴游戏 调教日本女仆游戏攻略 动画美人鱼小游戏大全集 调教游戏免费手机版下载地址 大型大卡车停车游戏下载 调戏日本女佣小游戏 动画美人鱼小游戏大全集 动画霸王龙吃人的游戏 大型大卡车停车游戏下载 动画美人鱼小游戏大全 调戏日本女佣小游戏 调教游戏 的视频 大型联网枪战游戏 叠叠高小游戏大全 调教女学生小游戏在线 调教日本女仆游戏攻略 钉子的游戏怎么玩 调戏日本女佣小游戏 大型会议小游戏 调教游戏都有什么东西 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 齐天云帝 我俩搞点事 大小姐的末世保镖 数据代码 仙武帝祖 百家乐官网 澳门葡京游戏官网 澳门葡京官网 百家乐官网 亚星官网 动画美人鱼小游戏大全 调教女学生小游戏在线 钉子的游戏怎么玩 大型大卡车停车游戏 调教游戏都有什么 大型 sm 游戏 调教小女仆游戏下载地址 大型大卡车停车游戏下载 叠叠高小游戏大全 动画美人鱼小游戏大全集 动画美人鱼小游戏大全集 大型励志游戏大全2015 大型励志游戏大全2015 大型大卡车停车游戏 大型大卡车停车游戏大全 大型 sm 游戏有哪些 动画美人鱼小游戏大全 调教女学生小游戏在线 叠叠高小游戏大全 大型插卡游戏大全 调戏性奴游戏 顶级调教游戏 调教小女仆游戏下载地址 大型大卡车停车游戏大全 动画霸王龙吃人的游戏 动画美人鱼小游戏大全 动画美人鱼小游戏大全 顶级调教游戏 顶级调教游戏 调教游戏都有什么东西