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
邮票行情邮票吧世界上第一枚邮票香港回归纪念邮票邮票吧鸡年邮票第三轮生肖邮票上海邮票网民居邮票邮票收藏价格表  【女帝】【开局无敌】【单女主狗粮】【摊牌】   本书又名《因为太宠娘子,被迫做无敌反派》   顾澜穿越玄幻小说,成为一名配角书生。   还多了一位貌美如花的小娇妻。   本想安稳苟住,凭借原著剧情躲开各路挂壁,和娘子相守一世。   可偏偏加载了文抄读书系统!   只要读书抄书,就能提取修为,成圣成神!   由于太过无敌,顾澜出门随便就碾死了大反派,各路气运之子气运之女争相认主!   实力起飞的同时,仕途也是邪了门的顺遂!   这一日。   顾澜高中状元郎,入殿觐见,却发现幕帘后那绝美女帝十分眼熟!   “娘子?”   “相公,穿上龙袍就不识得朕了吗?”   “......”   从此,全天下都知道了这对绝世夫妻。   原著男主角:“他都成天帝了,我才武之力三段,这怎么玩?”   【简介无力,全文爆爽】百妖之王的种族被屠杀殆尽,只剩下在地狱修炼的王子活了下来,王子为了找到凶手,参加了一个恢复时间线和星际问题的组织,与同伴一起拯救混乱的时间线,可在宇宙的深处中,却似乎有着一个不为人知的事情在瞒着所有人……岳峰,蓝星玩家联盟核心团第四军团长,180级六转大剑士。 在抵御异世界文明入侵失败蓝星彻底沦陷之际,他借助时空神器的力量携带游戏记忆重回三年前,【降临】开服前夕。 三年多的游戏生涯,让他知晓无数赚钱技巧、副本攻略、传说任务、装备出处…… 这些还不算,在第一次登陆游戏的时候,岳峰意外发现背包当中竟然携带了游戏中唯一的圣器《传承之章》。 凭借种种优势,岳峰在游戏中找回爱人,建立势力,统一游戏版图。 当三年后位面融合的时候,异位面降临者们悲哀的发现,等待他们的是游戏内攀升到了极致的工程学科技以及无数装备精良的玩家。 当团结一切力量消灭所有入侵者之后,岳峰发现,更大的挑战,还在后面……阳衡意外穿越异界,觉醒亿万增幅修炼系统 系统:“少年,你想变强吗?来来来,只需首充六块下品灵石,你就是本系统尊贵的VP1会员。” 阳衡:“会员有啥用。” 系统:“能够解锁亿万倍增幅修炼,还能额外赠送系统大礼包。’ 叮,恭喜你充值成功,成为尊贵的VIP1用户,你将获得十倍增幅修炼,获得天赋神通固若金汤。 叮,恭喜你充值成功,成为尊贵的VP1用户,你将获得百倍增幅修炼,获得天赋神通六星火神之赞。 蜻国与蝉国、蛐国发生战争,弄丢一国之宝即历代女仙眼原,新一代女仙蜻缘心到人界寻眼原,与修仙院中青鸟弟子画中潇结识并相爱。得知他们是同命,性命相互影响。画中潇帮助蜻缘心寻得眼原,但是被蜻国巫师施法陷害,故而缘心嗜杀成性,被世人封杀,至此,画中潇和蜻缘心的缘分被月老在情缘簿上划去,因而他们情缘终结……洛无邪重生了,这一次她再也不要错过爱慕的陆小北学长。 如果不是苏柚羽推她向马路的前一刻,说出了他的名字,到死也不会知道代替她下十八层地狱的人,竟然和陆小北有关。 第一次穿越居然遇到系长,才想起来这本笔记好像就是他的……余漠穿越十六年的,不仅是个瞎子,还被当做童养夫。 十六岁那年,他的眼睛被治好,打算逃跑的的看到眼前的女子,三观跟着五官跑了。结果成婚当天,却被一群卫道士,以铲除魔女口号,生生拆散。 且看余漠如何翻身逆袭的成功降服魔女。 车速不快,胜在稳定。一个病入膏肓的老头突然变成一个记忆全失的少年后,发现这个江湖还有他未曾领略的一面,既然老天给了他再来一次的机会,无论如何,他也要在这江湖中留下浓墨重彩的一笔......夜崇为了心爱的人放弃了一生修为。那一天,灵宝山外来了一位求道者,一柄长刀掀起了圣冉大陆的风云都市校园+军事权谋+伪科幻+古武异能+人工智能+元宇宙。 华夏龙国本应享受高中校园生活的少年,能力觉醒见义勇为,却被误以为是连环杀人狂魔而被全市通缉。 洗尽冤屈后再度陷入以‘神兽三城’‘七政党’‘六天道’‘五龙宫主’‘四海殿’‘三言两语’‘一遮天’为代表各个势力之间的恩怨纠缠。 面对着‘五维生物’入侵,‘黎明’组织袭击,‘神爱会’虎视眈眈,以及平行世界的悄然渗透,过严冬蔑视一切,豪气睥睨。 “不在列强下低头,只会在逆境中杀伐!命由我定,燃血而生!”
邮票互动网 中国邮票价格表 香港回归纪念邮票 邮票价格 猴年邮票 猴年邮票 邮票价格 邮票收藏价格表 世界上第一枚邮票 纪念邮票 邮票行情 世界上第一枚邮票 邮票图片 邮票吧 上海邮票网 邮票吧 邮票交易所 第三轮生肖邮票 邮票 南京文交所钱币邮票交易中心 鸡年邮票 中国邮票价格表 中国邮票 中国邮票 香港回归纪念邮票 文革邮票 邮票行情 第三轮生肖邮票 民居邮票 香港回归纪念邮票 上海邮票网 邮票行情 邮票收藏 大龙邮票 纪念邮票 中国邮票 纪念邮票 邮票交易所 邮票市场 邮票网 天元灭魔传六六班对抗办公室邪恶势力神明论层叠世界永恒帝师天元真仙枪挑万古之无脖传八十锤万古长空路修真小捕快缩小人类:微缩纪元掌运执尘老留都市!完美校花都是我的凤鸣之声天的审判者阖箍全职法师中的悠闲生活火影忍者穿越到日向家亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星游戏官网 亚星游戏官网 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 快链下载 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链加速器 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 Lets快连 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 亚星娱乐 快连VPN