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
向妈妈报恩漫画模式特殊的体检漫画巴哈姆特之怒漫画图片艾伦和兵长腐漫画资源蛋黄萝莉酱漫画向妈妈报恩漫画模式sm绳索漫画巴哈姆特之怒漫画图片山海迷踪漫画的句子super lovers漫画33集魔物娘之人马邪恶漫画巴哈姆特之怒漫画图片日本漫画名作排行魔物娘之人马邪恶漫画四大名捕漫画大全结super lovers漫画33集神威漫画最强魔女的童话 漫画全集蛋黄萝莉酱漫画甜美的咬痕漫画2话天上天下漫画22卷魔女的童话 漫画全集山海迷踪漫画的句子天之女王漫画多久更新死神Tv版完结漫画长篇穿越漫画死神Tv版完结漫画滑头鬼之孙漫画爷爷甜美的咬痕漫画2话qpa 漫画五年前,主人公黄殇在执行奉命跟踪亚洲最大毒贩诺菲的过程中,无意间撞见了自己未婚妻柳飘飘的丑事。酒店里激动的黄殇因为和未婚妻的争吵完全暴露了自己的行踪。因为他的大意不仅造成这次任务失败,致使毒贩逃跑,更造成一死多伤的惨剧。 五年后,依靠着聪明的头脑,如今的他已经成为坐拥数亿资产的隐形富豪。原本平静安宁的生活因为一天清晨的意外被打破了。开车行驶在路上的黄殇突然接到了医院好友的电话,他的好朋友独孤燕被查出了患有肝癌。对于这个女孩,黄殇早已深爱却不自知。在他人生失意和事业打拼这些年,独孤燕一直在身后默默地支持和帮助着他。眼看佳人即逝,黄殇决定放弃现在的一切,陪她一起走完生命的最后时光。 正当主人公黄殇陪着独孤燕,一点点实现她心中的那些愿望时,一个可怕的阴谋也正在围绕着他们慢慢展开。富家女陆零零突然出现,生意场上一个又一个的意外接踵而来。看似毫无关系的一切,却最终都指向了五年前的那个案子……他是青龙城乃至大明帝国的第一天才 她是大陆顶尖天才,是整个玄天大陆第一家族家主独女。 他的修行速度堪比天才,她更是天才中的天才。 然而,命运却让他们两个产生了交集,她遇到他,他也遇到了她! 他是一代天才,而她却是一代妖孽! 在大陆的顶端人群中,她是最耀眼的存在,而他却只是一颗微不足道的尘埃,她是一个光芒万丈的太阳,而他则是一颗灰暗的小星星。 从那一刻开始,他的目标只有一个,那便是追赶上她的脚步 她,是他一生的挚爱 她是一朵骄傲绽放的玫瑰,他只是那片花丛里的一个普通的花,一株微不足道的杂草,两个人,注定无法有结果 然而,他不会放弃,他不甘心,他要变强,他要成为最强者,他要站在她身边保护她,给她幸福和安宁! 他的崛起将引起整个大陆的震撼,他的强大会令整个大陆为之疯狂,他将取代玄天大陆唯一的神祇,他将成为玄天大陆数万年来唯一成功弑神的人类 他,一代传奇! 他叫墨知秋,他的名字和他的人生,从这一刻将正式拉开帷幕… 住进了隔离医院重症监护室的许如鹏,重生到了2005年去大学报道的绿皮火车上。前世逃避天作良人,浪迹花丛片叶不沾身,年近不惑,任然孑然一身,这一世,许如鹏还会做同样的选择吗?且看许如鹏情场商场翻云覆雨!中央电视台中文国际频道长江行文字版。生命本就脆弱,可以像尘土一样被一口气吹的烟消云散,但也可以活得无比顽强,像钢铁一般柔韧坚强。选择什么样的活法决定了人过什么样的生活,是像尘土一样毫无分量还是像钢铁一样成为国之柱石。在这个世界里,身存环境艰难,身边的亲朋好友随时都会被夺走性命,只有最坚韧的人才能活到最后。然而最终,我们都将从尘土里来,再回到尘土里去。 将科幻作为开篇,以武侠作为载体。 第一次写,受才能的限制,大有可能让人看不到三章,就有想连手机都扔掉的冲动。但依旧不依不饶,屡挫屡振的厚着脸皮的写,并发布。 我想写的是像金庸和古龙前辈们的那样。能让读者朋友们看了记在心里,茶余饭后还可一提。 但时下网文如此,适应者存,那也无可如何。在下没有敏捷的才能,断不能一日写个万儿八千不乱,亦不能长期保更。是注定要被大浪淹没的。就连寻求一个签约都成了遥不可及的奢望。 传统武侠江河日下,如今已渐渐式微,在当下的网络书海中,也无地立锥。究其缘由,还是因为金庸和古龙前辈的作品写得登峰造极,使后辈们难以望其项背。不留一丝破绽出来。导致传统武侠自此一蹶不振。 在下有自知之明,腹中文墨与前辈们有着云泥之差,无法再续巅峰,自然不敢拿着繁星去和皓月相比。 但自小酷爱武侠小说,也无限仰慕金庸和古龙前辈。压不住满腔热忱,在工作闲余中。这就不自量力的来献丑矣!高考毕业生王阳在经历了高考落榜,女朋友劈腿之后,意外的发现自己的手机中多出了一个短视频APP《快音短视频未来版》。 “盛鼎新城发生火灾,截止到6月28日,警方已经证实,此次大火造成两死一失踪,死者为集团董事长苏轻雪,大厦保安下落不明。” 正当王阳准备删除这个扯淡软件的时候,发现事情居然真的如视频所说的发生了…… 王阳本来想凭借预知未来成为一个亿万富豪,却因为一次刺杀意外觉醒了异能【神赋】,并且卷入了一场执法局与暗夜教会的斗争中……不追求CP结合,架空历史的一部帮派穿越小说! 道上老大白楚阳,在一次斗殴中被人刺杀,结果直接穿越到数百年前的白氏家族。 为了能让自己存活下去,同名同姓的白楚阳,使出自己在现代混迹的所有本领,让这个古代的白氏家族,逐渐成为一方霸主! 在一个异世界中存在着很多国家,在这众多国家中有些国家正密谋着一场大事。本期作品与当代最火二次元番剧合作例如:青春猪头,小马宝莉,国家队,从零开始的异次元生活,原神,埃罗芒阿老师,名侦探柯南,官途......原班人马照常不动。 本期作品介绍:男主从小白成为国家元老,开启10万后宫的故事 作品属性:二次元番剧恋爱小说
百岁福 论小废物的自我修养 逍遥小少爷 一品圣臣 全民御兽:开局天赋映照诸天 杀死星河 我真不是细作 诫殇录 回归纪元 毅游沧海 一揽星空 努力是为自己将来铺路 军团长的故事 神奇之环 我的狐妖小娇妻 幽梦寒影 我的妖孽二小姐 天道: 走错厕所被女教授给揍了 随着大众去修道 时间工口邪恶漫画在线 魔物娘之人马邪恶漫画 sm绳索漫画 艾伦和兵长腐漫画资源 时间工口邪恶漫画在线 腾讯妖怪名单漫画 sm绳索漫画 日本邪恶漫画之哆啦a梦 特殊的体检漫画 super lovers漫画33集 神威漫画最强 神威漫画最强 滑头鬼之孙漫画爷爷 魔物娘之人马邪恶漫画 甜美的咬痕漫画2话 艾伦和兵长腐漫画资源 设定少女汗汗漫画 特殊的体检漫画 山海迷踪漫画的句子 挖宝励志漫画 魔物娘之人马邪恶漫画 挖宝励志漫画 山海迷踪漫画的句子 死神Tv版完结漫画 绳子束缚漫画图片 滑头鬼之孙漫画爷爷 时间工口邪恶漫画在线 天上天下漫画22卷 山海迷踪漫画的句子 特殊的体检漫画 艾伦和兵长腐漫画资源 魔女的童话 漫画全集 巴哈姆特之怒漫画图片 甜美的咬痕漫画2话 长篇穿越漫画 四大名捕漫画大全结 巴哈姆特之怒漫画图片 sm绳索漫画 滑头鬼之孙漫画爷爷 四大名捕漫画大全结 死神Tv版完结漫画 下体被魔物侵犯漫画 甜美的咬痕漫画2话 男宠三千漫画 魔物娘之人马邪恶漫画 绳子束缚漫画图片 所以你爱我 漫画 死神Tv版完结漫画 仕舞妻漫画图集 设定少女汗汗漫画 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 道非身外之异域魔神 末世之黑门降临 重生后再次崛起杀回魔界 阴阳,五行诀 异界兽医 万利游戏官网 欧博游戏官网 欧博官网 万利游戏官网 快连下载 特殊的体检漫画 绳子束缚漫画图片 魔物娘之人马邪恶漫画 长篇穿越漫画 滑头鬼之孙漫画爷爷 天上天下漫画22卷 向妈妈报恩漫画模式 天之女王漫画多久更新 魔女的童话 漫画全集 下体被魔物侵犯漫画 特殊的体检漫画 甜美的咬痕漫画2话 super lovers漫画33集 长篇穿越漫画 sm绳索漫画 特殊的体检漫画 时间工口邪恶漫画在线 魔物娘之人马邪恶漫画 魔物娘之人马邪恶漫画 长篇穿越漫画 长篇穿越漫画 天上天下漫画22卷 时间工口邪恶漫画在线 滑头鬼之孙漫画爷爷 仕舞妻漫画图集 四大名捕漫画大全结 qpa 漫画 山海迷踪漫画的句子 日本邪恶漫画之哆啦a梦 设定少女汗汗漫画