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
获得异能可以修复损坏古董的小说刚上来有个叫雷子的配角三域神小说龙狂都市 亦童 小说系列小说三男主是少爷 叫女主小野猫王的二次元 小说获得异能可以修复损坏古董的小说刚上来有个叫雷子的配角十年只如一世一梦 嫣华 小说龙狂都市 亦童 小说绽放 奈菲尔 小说失忆 导游 小说崖山 穿越小说获得异能可以修复损坏古董的小说刚上来有个叫雷子的配角神仙也有江湖 小说崖山 穿越小说龙狂都市 亦童 小说失忆 导游 小说席绢 最新小说k小说结局k小说结局守望者 小说农妇 小说作者: 古依灵k小说结局绽放 奈菲尔 小说萧翎小说王的二次元 小说找一本修真小说 分修真界 仙界 神界 圣界 天界 还有个什么界的系列小说三男主是少爷 叫女主小野猫刀煮酒无味 孤昱 小说严琦小说神仙也有江湖 小说谁的青春不曾醉心于音乐、梦想抱着吉他为心上人引吭高歌?有道是商场如战场,岂知眩目的舞台亦如是。热爱文艺的男主由学生时代青涩的小歌迷,经历高人的点拨、学琴的快乐、打工的艰辛、大学的才气、组队的磨砺、爱情的甜蜜与苦涩,逐步迈入乃至深入“圈”内,才发现光怪陆离的聚光灯下竟是鱼龙混杂,辉煌暗淡得意伤感伴随尔虞我诈恩恩怨怨。历经悲欢离合坎坷多舛音乐之路的男主披荆斩棘终迎来演艺巅峰。铿锵奏鸣二十载史诗般摇滚传奇,激情澎湃致敬青春华彩与光荣梦想的一曲励志赞歌。带着音符节奏般的文字表述,身临震撼现场般的阅读体验。陌生朝代一品大将府的庶子,突然融合了一个现代人的记忆。 这段记忆会给他带来怎样的变化?又会给这个世界带来怎样的变化? 叶飞流躲在家里偷偷的修仙,对外谎称在家写小说。 别人都不知情,直到某一天,为了救邻居家的小孩,叶飞流一只手拦下冲撞过来的一辆货车。 全村都震惊了。 从此以后,叶飞流带着叶家全族修仙。 十年后,世界与异空间融合,无数外域异兽入侵,一夜之间,全球陷入绝望之中。 就在这个时候,叶家全族挺身而出,御剑飞行,抵挡异兽洪流。 举世震惊! 外国:“天啊,龙国怎么会有那么强大的人。” “我为什么没有生在龙国?!” “啊啊啊,龙国人好幸福,他们有叶家。” PS:土豆出品,必属精品(嘿嘿)! 天龙国皇权覆灭后百年来有三个派系组成,士族派,中立派,变革派维持着整个国家的平衡。 但因为一个二三岁的男人改变了这种平衡,他为变革派代表,一心想要铲除世家门阀让国家成为一个人人平等的国度。混迹于政治场上长大的皇子,立誓要做一位明君。奈何寒来暑往物换星移,登上龙椅执掌天下时,才知皇帝的不易。酒池肉林夜夜笙歌,使其明君之路步履维艰,最终成为了要美人不要江山的快活皇帝。一柄剑,一个人 斩这天,破苍穹陈晓穿越大唐贞观初年,继承了家中位于长安东市的酒楼。 哪知那唐皇李世民化名李二哥,成了酒楼的常客。 推杯换盏之余,李世民的问题也越来越奇怪: “陈掌柜,突厥屡屡南下劫掠,可有一劳永逸的办法?” “陈掌柜,蝗灾荼毒天下,朝廷应当如何应对?” “陈掌柜,天下之大,我大唐铁骑如何能雄霸天下?” 陈晓有些头疼,我就一开饭馆的,你总问我这干啥? 关键是,大唐铁骑怎么还真雄霸天下了?九五后小县城协理员高煌在一次拍摄风景时偶尔入梦,结果在梦里获得了一座古老的神庙。通过这座神庙,高煌每一次在梦里都能垂钓上来不同的改变他命运的东西。那么,高煌会通过这座神庙,能让他的生活有什么变化? 而这座神庙的背后,又隐藏了什么故事? 请打开这本书,让我们踏上一段不同于他人的美好旅程!生化危机爆发三年后,秩序崩塌、纲常败坏、世界重构、回归原始。物竞天择,能活到今天的幸存者都不是善茬,他们组成一个又一个强悍团队,重新了建立规则。然而,地球两级正在悄然重置,寒冬来临,残酷的自然环境将好不容易形成的平衡彻底击碎。在活着面前,所有尊严和人性一文不值,更加艰难的挑战再次降临在这帮已经经过一次筛选的幸存者中。生存还是死亡,这是一个问题,比丧尸更可怕的,从来都是人心。本书是一本神话小说集,全书创作很具有新颖性,全书中含有作者搜集并改编的民间神话传说三四篇,其余全部都是作者的原创作品,其中《没有终点的游戏 游戏之妖》一篇在2019年美国特朗普总统在工作中使用。
全世界都变成怪物,除了我 全球灾变:我的武功自动修炼 逆生长空间 凡尘炼体 十八戒调查局 时空造梦人 大汉之上 曲折半生 济天: 贫道丘处机 逍遥王破山河 山河弃 京城第一刺客 玄龙剑诀 开学驾驶直升机报到正常吧 带着系统来重生 宇宙第一武者 逆袭吧,舔狗反派 大齐小侍卫 新化道有情 冰心简介小说家诗人 圆缺小说 席绢 最新小说 k小说结局 冰心简介小说家诗人 身体像把锁 解开的话 就能破除瓶颈 修仙小说 重生之鬼国女帝 清水紫菀 小说 我吃了女朋友 恐怖小说 找一本修真小说 分修真界 仙界 神界 圣界 天界 还有个什么界的 神仙也有江湖 小说 绽放 奈菲尔 小说 绽放 奈菲尔 小说 萧翎小说 失忆 导游 小说 迷晴惑爱 桑海拾年 小说 王的二次元 小说 重生之鬼国女帝 清水紫菀 小说 找一本修真小说 分修真界 仙界 神界 圣界 天界 还有个什么界的 农妇 小说作者: 古依灵 获得异能可以修复损坏古董的小说刚上来有个叫雷子的配角 圆缺小说 龙狂都市 亦童 小说 三域神小说 随风 水见 小说 我吃了女朋友 恐怖小说 萧翎小说 找一本修真小说 分修真界 仙界 神界 圣界 天界 还有个什么界的 三域神小说 农妇 小说作者: 古依灵 找一本修真小说 分修真界 仙界 神界 圣界 天界 还有个什么界的 k小说结局 圆缺小说 系列小说三男主是少爷 叫女主小野猫 获得异能可以修复损坏古董的小说刚上来有个叫雷子的配角 萧翎小说 王的二次元 小说 永夜邪神 紫凰 小说 重生之鬼国女帝 清水紫菀 小说 萧翎小说 永夜邪神 紫凰 小说 王的二次元 小说 带刺萌妃 落花飘雪 小说 守望者 小说 血族少年 祈轩 小说 随风 水见 小说 圆缺小说 绽放 奈菲尔 小说 系列小说三男主是少爷 叫女主小野猫 严琦小说 十年只如一世一梦 嫣华 小说 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 循环的幸福世界 从矿奴开始,万族称尊 光与暗之绝代天骄 燕武纪 基因突变之无限穿越 葡京官网 快连下载 欧博官网 葡京官网 欧博官网 圆缺小说 迷晴惑爱 桑海拾年 小说 席绢 最新小说 席绢 最新小说 龙狂都市 亦童 小说 永夜邪神 紫凰 小说 守望者 小说 崖山 穿越小说 系列小说三男主是少爷 叫女主小野猫 黎星刻 朱雀 小说 绽放 奈菲尔 小说 迷晴惑爱 桑海拾年 小说 k小说结局 血族少年 祈轩 小说 龙狂都市 亦童 小说 冰心简介小说家诗人 迷晴惑爱 桑海拾年 小说 守望者 小说 十年只如一世一梦 嫣华 小说 十年只如一世一梦 嫣华 小说 龙狂都市 亦童 小说 龙狂都市 亦童 小说 严琦小说 守望者 小说 永夜邪神 紫凰 小说 系列小说三男主是少爷 叫女主小野猫 圆缺小说 展眉 小说 身体像把锁 解开的话 就能破除瓶颈 修仙小说 十年只如一世一梦 嫣华 小说