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
嵩山邮票价格邮票邮政博物馆pjz 加字邮票三潭印月邮票价格邮票 毛主席书法嵩山邮票价格j173错版邮票pjz 加字邮票世界最早的邮票黑便士炒邮票有风险吗中国恐龙邮票pjz 加字邮票中国现代科学家邮票中国恐龙邮票发行邮票 微信炒邮票有风险吗邮票 1995-2非典龙邮票价格非典龙邮票价格中国工农红军长征胜利六十周年邮票孔子邮票价格非典龙邮票价格世界最早的邮票黑便士孙中山8分邮票价格邮票 中日邦交正常化20周年 中邮1993李济深邮票价格邮票 中日邦交正常化20周年 中邮孙中山8分邮票价格中国工农红军长征胜利六十周年邮票中国现代科学家邮票奇风历二零二二年,叶玄青自青州出,秉着一颗光明剑心,踏上征途! 这是一个瑰丽而又充满未知的剑道世界,这是一个平凡少年成就绝世强者的传奇! 热血的对决,天才的竞争,七尺剑芒,千里直驱,君子白衣,纵剑天下!一个贵族天陆之上,唯我独强! 少年陆轩,岐灵山中历经危险,机缘下得到一枚古老玉璧,等待他的将是......,【妹妹+武道、热血又轻松,御兽+魔法、弥补武道缺,修仙+科幻、精彩又好看,文学+自创、名言嘎嘎多…】 我有一口冥皇棺,可葬天、葬地、葬日月星辰、葬仙神魔圣、葬星空万族、葬宇宙八荒、葬无上大能、葬尽世间一切不公,为万世开太平。 社会不再不仁,学习已不是唯一的出路,灵气复苏,武道兴起、法道繁荣、修仙道法、异能者频繁出现、御兽者也在争其锋芒、不过这一切只是表面,灵气复苏导致地球星空坐标暴露,这么好的一个可利用资源,谁不想对其侵略? 不过,地球上的众人、众兽怎能容其侵略? 又名《猫来》《拳来》《法来》《爷来》《爸来》《星空入侵》《全球高武》《全球御兽》《全球修炼》《全球异能》《开局从爷爷手中接过传家宝》《星空入侵》《全球高武》《全球御兽》《全球修炼》《全球法师》《冥皇棺来》世界本无对错,人间也无善恶,人也罢,兽也罢,都是为了活着,道不同,不相为谋。注:本书节奏较慢,二十章才是个小高潮,阅读前请先给作者一张原谅票,不管看不看,小比作者先谢谢各位了那一天,章浩获得了一个神奇仪器! 御兽只要戴上这个头盔,就可以通过观看影片的方式变强! 梦里: 【御兽:熊猫】 【已观看《武林熊猫》系列】 【冲拳熟练度:入门→出神入化】 【掌握新技能:迅雷拳(熟练)、无锡指法(熟练)、金钟罩(精通)……】 现实: 【御兽:熊猫】 【已观看《武林熊猫》系列】 【掌握新技能:吃(出神入化)】 章浩:??? 六个小时过去,你就学会了吃? ………… 实战考核现场,看着用出神入化级“吃”一口将金属系对手吞到肚子里的熊猫,众人惊呆了。 章浩故作镇定地笑了笑:”咳咳……没错,我的御兽就是这么清奇!“我叫白凌云,当我睁开眼时,我发现我竟然穿越了。 这里有武者,有魔法,有修仙,有忍术,有异能…… 在这里,武者是最卑微的存在,武已经没落了…… 而我,刚穿越就面临一个很严重的问题…… 谁能给我一碗馄饨面呀!我都快饿死了!一觉醒来,赵然发现自己穿越了,还特么被女土匪抓去当压寨小郎君了…… 他只是想在这个异世界好好地过完这一辈子,但是他的命运早就和女土匪绑在一起了…… 走投无路的他,只能和女土匪在土匪的道路上越走越远……父母被害,灵种被夺,背负血仇的少年带着神兽回归!杀尽仇人! 少年:巫妖余孽?杀人魔头?只要能手刃仇人,巫妖又如何?魔头又如何? 天才们:“哎哟喂!求求你别叫我天才了,你不知道有个家伙专揍天才吗?”无数年前灵气复苏蓝星生命变异,人族岌岌可危。 此时,武者应运而生,终于在妖魔的攻击中寻得一丝生机。 林枫以武者为目标,日复一日却不得寸进,都是因为他做了一个奇怪的梦。 梦中,他如同在万万年前度过了一生,循环往复。 直到他发现自己居然能够影响梦中的自己,还能继承部分实力。 基础锻体法,修行百年!参悟出自然呼吸法! 基础血气法,修行千年!参悟出武神不灭经! 基础武者拳法(基础血气法),修行万万年!参悟武道神拳,一拳开天地! “他的基础功法……怎么和武神传下的残缺功法如此相像!” “为何他的炼丹技术……比之活了百万年的家族还要精通!” 直到无数年过后,通天大妖率众妖进攻,人族无力抵抗。 无数人鼎礼膜拜,诵经之声传遍天地! “求武尊救救人族!” 一道武神虚影自泰山之中走出,而这道虚影……
神谕末日 浩劫余生 如果有重开 不存在的游戏人生 封坛惊鸿 未来之后 长妄河 书圣门 :曜灵 兰陵王的神瞳 绝品医王 阿达卡之令 无门无派游江湖 无名的尘埃 逍遥的呀,小神仙 迪卢克的樱花连 神探太司懿之明王出世 九天神脉 让心儿静一静 梦囚天 全世界无产者联合起来邮票 邮票 1990 花 邮票 1995-2 邮票 毛主席书法 全世界无产者联合起来邮票 纪念邮票价格表 邮票 1995-2 万国邮政联盟大会邮票 1993李济深邮票价格 上海邮票公司 太平天国金田起义百年纪念邮票价格 太平天国金田起义百年纪念邮票价格 大版邮票年册价格 邮票 1990 花 嵩山邮票价格 邮票 毛主席书法 嫦娥三号邮票 1993李济深邮票价格 邮票 治理黄河远景 pjz 加字邮票 邮票 1990 花 发行邮票 微信 邮票 治理黄河远景 中国恐龙邮票 炒邮票有风险吗 大版邮票年册价格 1993李济深邮票价格 邮票邮政博物馆 邮票 治理黄河远景 1993李济深邮票价格 邮票 毛主席书法 澳门邮票1998 三潭印月邮票价格 嵩山邮票价格 孙中山8分邮票价格 邮票 毛主席书法 三潭印月邮票价格 邮票 1995-2 大版邮票年册价格 发行邮票 微信 邮票 中日邦交正常化20周年 中邮 上海邮票公司 1999年邮票发行量 嫦娥三号邮票 中国恐龙邮票 澳门邮票1998 太平天国金田起义百年纪念邮票价格 邮票 中日邦交正常化20周年 中邮 大版邮票年册价格 j173错版邮票 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 近身兵王 开局和女神流落荒岛 重回到16岁的灿烂人生 缚天咒君 这不是高能 亚星管理平台 亚星官网 万利官网 亚星管理平台 澳门葡京官网 孔子邮票价格 1999年邮票发行量 邮票邮政博物馆 邮票 治理黄河远景 邮票 中日邦交正常化20周年 中邮 邮票邮政博物馆 纪念邮票价格表 三潭印月邮票价格 孙中山8分邮票价格 j173错版邮票 中国工农红军长征胜利六十周年邮票 j173错版邮票 邮票 1990 花 邮票 1995-2 嵩山邮票价格 世界最早的邮票黑便士 pjz 加字邮票 邮票 1990 花 三潭印月邮票价格 pjz 加字邮票 漳州木版年画邮票 发行邮票 微信 邮票 毛主席书法 中国现代科学家邮票 非典龙邮票价格 纪念邮票价格表 澳门邮票1998 纪念邮票价格表 世界最早的邮票黑便士 孙中山8分邮票价格