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
bl漫画家彩bl漫画睡梦中的男人bl漫画检查 惩罚bl漫画蜡烛playbl漫画恋爱暴君九quanbl漫画家彩bl漫画虐恋bl漫画检查 惩罚bl漫画受是快递bl漫画鲁路修结婚bl漫画恋爱暴君九全集bl漫画检查 惩罚bl漫画摸屁股bl漫画恋爱暴君九全集bl漫画可爱女友bl漫画鲁路修结婚bl漫画强受吧bl漫画恋爱暴君九卷bl漫画恋爱暴君九卷bl漫画雨bl漫画兽人贴吧bl漫画恋爱暴君九卷bl漫画受是快递bl漫画有肉漫贴吧bl漫画力量牛乳bl漫画无法言说的bl漫画力量牛乳bl漫画有肉漫贴吧bl漫画雨bl漫画摸屁股“爸爸,我要吃饭饭!” 一觉醒来,来到平行世界的刘子夏,多了个亲的不能再亲的闺女。 为了让女儿吃饱饭,为了让女儿住大房子,也为了让女儿她娘回来…… 刘子夏能怎么办?他也很无奈啊! 好在刘子夏带着一个世界的文娱信息,这些压力,似乎不存在啊? 面对那些文娱大佬,刘子夏表示: “不要误会,我不是针对你,我是说,在座的各位都是垃圾!” 公布企鹅群:1054365860(一零五四三六五八六零)机缘巧合下,林星得到了神针空间,空间里有用不尽的灵水。 灵水喷洒过的果树,果子美味。 灵水种出来的花草,品相极佳。 灵水浇灌过的药材,价值翻倍。 除了种田,神针还有别的功能等待林星一一开发! 守着山头种树养花种草,养只看家猫,林星的小日子过得不要太滋润。 三番四次偶遇大明星顾若曦,她有一个林星的秘密……九灵大陆,广袤无垠!其上有修炼之人,可飞天遁地!大能之辈,更可移山填海!失忆少年,心中有梦!披荆斩棘,踏仙路而行!儿女情长,述世间痴情!热血澎湃,结兄弟情义!修神功,诛妖魔,终临世间之巅! 道尘本是一个毫无灵根的废柴,注定无法修炼,但是他确实一个顶级富二代,本以为,就只能平平淡淡的渡过这一生,可谁都没想到,他在一次濒临死亡时,发现了自己的真实身份,从此开启了他这传奇的一生……少年林羽岐因体质原因无法再修练,但意外复苏神秘小塔,修乱天不灭决,觉醒特殊体质,从此神挡杀神,佛挡杀佛,若我成神,我便灭尽世间一切敌…… 境界设定:凡→仙→圣→神红月当空,全球骤变。拥有力量,你就高高在上,应有尽有,没有力量,你就只能任人宰割。危机爆发,众种族林立,丧尸,异兽,鬼种,人类。九转山河,浩瀚天下,试问天下,谁与争锋!起步比别人晚的颜逸能否追赶众人的脚步,在末日之中杀出一条属于自己的路。在这片奇幻的大陆上,有着诸多的神明与拥有强大力量的人类与非人类,他们都拥有各自的文化与文明,在一切都有序的进行时,一场阴谋的风暴正在悄然接近......凄冷的圆月下,寥寥孤魂在一望无际的大陆上游荡。天边,时而有憾人心弦鸟鸣。虚幻的夜晚,不知还有谁彻夜未眠。 西北荒漠、大沼泽、海与腐灼之地,世界究竟有多大? 似乎是亘古不变的,御魔界像风烛残年的老人,苟延残喘着。 从何时起,分为三域的御魔界迎来了新生,接着又是灭亡。一次次的破碎中,罗盘十二境在混沌里缓缓旋转。 谁知道,明天,又是什么样...... 建文四年,朱棣拖家带口举兵造反,攻进应天府时,最疼爱的太孙朱瞻基却离奇失踪。 朱棣大怒,认为是建文乱臣所为,遂屠杀一万四千余建文乱臣及家眷,流放三万余靖难遗孤,以表对太孙疼惜之意。 …… 十一年后,一少年乱了朱棣心智,朱棣时常化作普通老头,与他一起打猎。 “老爷子,我真不是你孙子,我是从死人堆里爬出来的,没有亲人。” 朱棣听着朱辰的独白,禁不住就落泪了。 “谁说你没亲人,我现在告诉你,你爷爷是永乐大帝朱棣,你是大明皇嫡长孙。” 朱辰:“老爷子,您别骗我了。” 朱棣道:“不信也罢,我欠你一个盛大的复辟仪式。” 次日,应天府白日宵禁,万人空巷,十万大明铁骑进城,为首一人,正是那身穿铠甲,龙虎精神的老爷子! 爷孙俩隔空对望一眼,朱棣一笑。 十万大明铁骑下马,恭敬跪地大吼:“恭迎大明皇嫡长孙回朝!”五彩斑斓的背后总是深邃的黑……马克?李,无论干掉你的是谁,我都会为你报仇,以告慰你在天之灵。 注①:第一次写文,用的是第一人称,慎入。 注②:因为是同一个作者写的, 所以这篇也能在话本小说(如果有更多 人支持的话将来可能会在B站?)找到。 注③:作者是学生党,随缘更新。
他朝若是同淋雪 莫名成神 地球陨落 鲸落花开 人道道人 星翰巨企 横推菊花皇朝 转生为自己小说的角色?! 隐世强龙 剑与风云传 重生之我们来自地球 万界之征战 青莲剑心传 弑烬武煞 万界第一皇 非冒名顶替 主角系统多亿点不过分吧? 怪物大师:新传说世纪 天门计划 梦仙穹 bl漫画贴吧我要结婚了 bl漫画恋爱暴君有几集 bl漫画强受吧 bl漫画恋爱暴君九quan bl漫画贴吧我要结婚了 bl漫画湘南恋歌 贴吧 bl漫画强受吧 bl漫画路人英 bl漫画无法言说的 bl漫画米英 bl漫画受被变小 bl漫画受被变小 bl漫画有小人 bl漫画恋爱暴君有几集 bl漫画家彩 bl漫画恋爱暴君九quan bl漫画囚禁锁链 bl漫画无法言说的 bl漫画双胞胎的游戏下载 bl漫画检查 惩罚 bl漫画恋爱暴君有几集 bl漫画可爱女友 bl漫画睡梦中的男人 bl漫画恋爱暴君九全集 bl漫画鲁路修结婚 bl漫画有小人 bl漫画无法言说的 bl漫画睡梦中的男人 bl漫画双胞胎的游戏下载 bl漫画无法言说的 bl漫画恋爱暴君九quan bl漫画恋爱暴君九全集下载 bl漫画蜡烛play bl漫画家彩 bl漫画有肉漫贴吧 bl漫画恋爱暴君九quan bl漫画蜡烛play bl漫画强受吧 bl漫画有小人 bl漫画可爱女友 bl漫画力量牛乳 bl漫画米英 bl漫画战争 bl漫画囚禁锁链 bl漫画恋爱暴君九全集 bl漫画恋爱暴君有几集 bl漫画受被变小 bl漫画力量牛乳 bl漫画有小人 bl漫画虐恋 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 方,圆 桃源小刁民 剑道崛起 诸天造化书院 异世:学神崛起 快连下载 亚星管理平台 亚星官网 亚星管理平台 万利游戏官网 bl漫画恋爱暴君九quan bl漫画恋爱暴君九卷 bl漫画路人英 bl漫画摸屁股 bl漫画受被变小 bl漫画战争 bl漫画力量牛乳 bl漫画无法言说的 bl漫画检查 惩罚 bl漫画双胞胎的游戏下载 bl漫画恋爱暴君九卷 bl漫画有小人 bl漫画摸屁股 bl漫画摸屁股 bl漫画恋爱暴君九全集下载 bl漫画恋爱暴君有几集 bl漫画力量牛乳 bl漫画贴吧我要结婚了 bl漫画兽人贴吧 bl漫画家彩 bl漫画恋爱暴君九quan bl漫画强受吧 bl漫画双胞胎的游戏下载 bl漫画蜡烛play bl漫画受被变小 bl漫画恋爱暴君九全集下载 bl漫画贴吧我要结婚了 bl漫画尿道控制监禁 bl漫画家彩 bl漫画家彩