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 in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically.

<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

p>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="span6">
        Level 1 column
        <div class="row">
            <div class="span3">Level 2</div>
            <div class="span3">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>

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>

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: 767px) { ... }
  /* Portrait tablet to landscape and desktop */
  @media (min-width: 768px) and (max-width: 979px) { ... }
  /* 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 hiding 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
徐州金鹰商场客服电话南宁优家公寓 电话梅冲水库电话昆山高铁到宁波高铁时刻表查询电话固安花店电话徐州金鹰商场客服电话樟木头水果批发市场招商电话梅冲水库电话罗田公交总站电话白石山云尚酒店电话滨州到上海大巴电话是多少徐州金鹰商场客服电话石家庄裕华大酒店电话滨州到上海大巴电话是多少梅冲水库电话白石山云尚酒店电话元翔航空电话号码固安花店电话固安花店电话旌德至宁国电话郴州到绍兴火车票查询电话南京 南京汽车客运站时刻表查询电话罗田公交总站电话vics酒吧订台电话东莞长安步步高售后服务电话滨江搬床电话昆山高铁到宁波高铁时刻表查询电话加会到南宁汽车电话旌德至宁国电话宝峰湖门票价格电话星游在逃脱时空乱流后随机降落到了一个星球上,物资将尽的他喜出望外地勘测了一番,却发现这个星球上的生物正是追杀从而致使他落入时空乱流的相族的祖先…… “元姬,别拦我,让我炸了这个星球!” “可是……主人……我们已经没有能够摧毁星球的武器了啊……您忘了它们早就丢失在时空乱流里面了吗?” “那就再给我造出来……” …… 种田文(雾)“玄机神,九大神宗存在已近千年。是时候该挑起战争打破这九分天下的格局了。” “的确,这天下已经濒临崩溃。若再不挑起战乱,恐怕这个世界会再度毁灭。” “玄机神,不如趁着龙泉宗还没强盛,让天地历经战乱吧.....” 玄机神坐于高位,素手轻拂。 “百年之内,我不会挑起战乱。” “神尊这是何意?您明知百年之后龙泉宗将无人能敌.....” 玄机神轻笑“所以百年后,我会让八大神宗合力覆灭龙泉。” “这......” “但战乱并不会就此停止,龙泉宗也不会就此覆灭。” “会有一个少年,带着龙泉宗最后的希望出逃,直至将八大神宗全部消灭。”新月国大陆,宗门多如沙子,强者无数,凡间位面无数,一个渺小家族的子弟,因机缘巧合,得一个无名方石,觉醒武道天赋,在阵法,炼丹,炼器,符文,血脉传承成为一名妖的存在,与各个天才妖孽无上比拼,武道不局限于人间,一掌手握苍穹,一脚踩于整个大陆,浩瀚星空,无数位面,轮回天道,以武逆神明,以武修炼神,一掌一脚震杀亿亿万名星空宇宙神明,黄泉地下之鬼神。 0260年12月24日平安夜,米国旧铜山首现大批海兽,全城人民无一幸存! 0261年4月23日,北熊国出现6级海兽,全国沦陷! 0262年1月1日,新年第一天,华夏出现10级海兽,代号【饕餮】,华夏沦陷! ...... 0260年1月,华夏战神臣风重生到海兽爆发十一个月前。 他赢得高层信任,将在华夏近两万公里的海岸线上铸起一座钢铁长城! 外媒惊为:东方奇迹! “求求臣战神,打开国门放我们进去!” “我们要呼吸东方没有血腥味的空气!” 李乐明是个技术宅,有一天,丧尸病毒入侵,寄生虫紧跟其后,天气变化无常,自然灾害频繁给事情雪上加霜,为了活命,技术宅李乐明自制系统和武器对抗逆境。 (本书为短编科幻故事,主打未来科技,是爽文,无敌文,由于一章章节字数较小强烈建议存起来达到一定字数再看!)苏不弃,绰号“输不起”。 一介凡人,只得靠自己的努力和勤奋,才能踏上修行之路,以证大道穿越到玄幻世界,莫无念大站自己成了绝天魔域最强魔主,身负世人骂名。 然而他早有预感,料定会有天命之子来割韭菜...... “禀报魔主,属下已经找到了身负大气运之人。” “????” “此子身上有一缕残魂,和我魔域还有莫大关系,更和那古家......” 果然,剧本还是来了。 作为穿越者的莫无念怎能忍受得了。 “传令整个魔域……” 【叮!绑定系统】 【本系统为反派服务】 …… 重生先天人族,本以为是人生巅峰,哪知道却要面临重重危机,在妖族的虎视眈眈下,陆丰凭借自己的努力,和系统给予的机会, 定人族三祖,册三皇封五帝,立人道圣人,对抗天庭和鸿钧,以及强大的天道—— 陆丰:“巫妖量劫来临之前,我要让整个洪荒,都在人族的铁拳下颤抖……”四方界域,广袤浩瀚,亿万星球,无尽大陆。传闻,在第四界域的尽头,隐藏着惊天之密,能使成为四方界域的掌控者,长生万右。少年李南风得到神秘玉剑,修无上功法,习太初阵术,炼灵丹妙药。从微末中崛起,斩古帝、劈祖龙,闯到第四界域,于界域尽头证得的四域神尊,名垂千史。他,因孽恋交错获神魔同体。 而他,千年来最有可能踏入神殿之人。 是神是魔,亦魔亦神! 神动天下,修武先修心。 魔逆苍穹,成魔再成神! 神魔共舞,一念悟乾坤!
凌云誌 大唐之何方道友在此渡劫 第二颗太阳 破败之地 鸿煊黎明 诡计多端小女友 众生平等 万物归零 表与里之歌 大古剑仙 语言方方面面 诡异世界,我的呱呱军团 坐化三千年,发小变女帝? 大秦:开局觉醒暗影系统 我是大主祭 重生之超级导演 穿越时间的思念 地五星 末世血魔王 天外通天 白羽沉梦洛星辰 徐州金鹰商场客服电话 12306安阳火车站电话是多少时间 滨江搬床电话 石家庄裕华大酒店电话 鲅鱼圈远航装饰电话 上海东明家具浦西电话 滨江搬床电话 乐影网客服电话 梅冲水库电话 罗田公交总站电话 加会到南宁汽车电话 加会到南宁汽车电话 昆山高铁到宁波高铁时刻表查询电话 12306安阳火车站电话是多少时间 滨州到上海大巴电话是多少 果老峰狩猎场电话 镇江361专卖店电话 徐州金鹰商场客服电话 旌德至宁国电话 如皋锦江之星的电话号码 元翔航空电话号码 如皋锦江之星的电话号码 翡翠小城 电话 南京 南京汽车客运站时刻表查询电话 新乡到合肥的大巴电话是多少钱 海南途家电话号码 滨江搬床电话 翡翠小城 电话 郴州到绍兴火车票查询电话 滨江搬床电话 固安花店电话 如皋锦江之星的电话号码 昆山高铁到宁波高铁时刻表查询电话 徐州金鹰商场客服电话 vics酒吧订台电话 东莞长安步步高售后服务电话 上海东明家具浦西电话 12306安阳火车站电话是多少时间 vics酒吧订台电话 上海东明家具浦西电话 东莞长安步步高售后服务电话 果老峰狩猎场电话 旌德至宁国电话 小榄菊城酒店电话 滨州到上海大巴电话是多少 如皋锦江之星的电话号码 乐影网客服电话 东莞长安步步高售后服务电话 海南途家电话号码 樟木头水果批发市场招商电话 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 光阴旅人 长平长平 三国:气运图录,开局娶亲大小乔 万祖 天下第一卦 葡京官网 欧博官网 亚星管理平台 AG真人 皇冠登3出租 加会到南宁汽车电话 昆山高铁到宁波高铁时刻表查询电话 海南途家电话号码 加会到南宁汽车电话 如皋锦江之星的电话号码 vics酒吧订台电话 鲅鱼圈远航装饰电话 滨州到上海大巴电话是多少 徐州金鹰商场客服电话 罗田公交总站电话 上海东明家具浦西电话 罗田公交总站电话 宝峰湖门票价格电话 郴州到绍兴火车票查询电话 东莞长安步步高售后服务电话 滨江搬床电话 固安花店电话 宝峰湖门票价格电话 滨州到上海大巴电话是多少 固安花店电话 罗田公交总站电话 南京 南京汽车客运站时刻表查询电话 新乡到合肥的大巴电话是多少钱 小榄菊城酒店电话 新乡到合肥的大巴电话是多少钱 鲅鱼圈远航装饰电话 石家庄裕华大酒店电话 鲅鱼圈远航装饰电话 镇江361专卖店电话 徐州金鹰商场客服电话