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
狗狗发烧喝什么狗狗耳狗狗中耳炎的病狗狗发烧喝什么牌子好狗狗发烧喝什么症状怎么办狗狗发烧温度是多少算正常狗狗发烧喝什么狗狗耳朵上有出血了怎么办啊狗狗发烧喝什么牌子好狗狗耳朵外面有红点点狗狗耳朵毛长怎么编狗狗耳朵螨虫什么样狗狗发烧喝什么牌子好狗狗耳朵如何立起来了狗狗耳朵螨虫什么样狗狗发烧喝什么牌子好狗狗耳朵毛长怎么编狗狗耳朵上有出血怎么办啊狗狗发烧温度是多少算正常吗狗狗发烧温度是多少算正常狗狗发热物理降温方法是什么狗狗耳朵有点血狗狗发烧温度是多少算正常吗狗狗耳朵外面有红点点狗狗耳螨照片狗狗发烧温度是多少钱狗狗耳廓肿了怎么回事狗狗发烧温度是多少钱狗狗耳螨液什么牌子好狗狗发热物理降温方法是什么狗狗耳朵如何清洁天地混沌,万物复苏生机勃勃的大地上出现六族之人争斗频频,最鼎盛时期引来天劫,天地裂变时空分离,六族圣物也随之消失,神界至宝琉璃鼎破碎,碎片掉落洒落六界,此时唐岩机缘巧合下得到琉璃鼎碎片,从此人挡杀人佛挡弑佛,引来天劫,拯救天地毁灭,对兄弟重情重义,怒发冲冠为红颜,大家一起来见证唐岩一步一步是怎么成长起来。主要是青天日月曜神为首的曜神与雷祖天尊普化大弟子张叔夜结下仇缘,后三十六天罡 七十二地煞帮助青天日月曜神一齐将雷祖与雷将一一打退,后齐天大圣大闹天宫,三十六天罡七十二地煞为报齐天大圣旧情,不发兵救援(玉皇大帝),被玉皇大帝关押在龙虎山,后洪太尉奉孙悟空之命放走三十六天罡 七十二地煞,雷部三十六将和雷部大弟子及其左右待者并约一十八散仙私自下凡除去三十六天罡 七十二地煞,后八位散仙一一阵亡,只剩那十名散仙,那八位散仙并告知青天日月曜神七十二地煞三十六天罡被斩,青天日月曜神等一齐大怒并上报玉皇大帝下凡除雷部三十六将,玉皇大帝也大怒道:请勿伤害雷祖三人,只拿回归案,朕自会解决。青天日月曜神等并道:好,遵陛下命令。青天日月曜神等转世为人,青天日月曜神只需了宣和十年将三十六雷将 八位散仙一一诛灭。一名超级保安,帅气超群,学历一本,家境一般,但是本领超群,婉拒两位超级富女的追求,在暗物质世界,探索,获得异样的安全。根据最新研究,宇宙中有很多暗物质和暗能量,构成暗世界,它们就在我们周围,如果能进入暗世界,则会获得宇宙的更多秘密,包括地球的秘密。 据说地球已有过4次史前文明,发达程度都比目前人类高得多。 如果能进入暗世界,得知它所记录的史前文明,用于今天某国的发展,则该国必将成为巨超一流强国。 其实,有许多人非要幻想星际旅行,寻找所谓外星人,其实外星人可能就在我们附近的暗世界里,只不过从暗世界越穿到明世界,很难很难,但是比星际旅行,寻找外星人要容易得多。 宇宙间最快的速度为光速,且光速不变。有静止质量的物体达到光速,则质量为无穷大。而且根据现有天文观测,离太阳系最近的恒星比邻星距离为4.22光年,它的一颗行星可能拥有生命,适合人居住。但是人类想要到达那里,根本不可能。 (无敌+反派+女帝+败家+签到) 被池瑶女帝背叛,九幽魔主帝九幽不甘殒落。 重生之后却意外觉醒迟到百万年的签到系统。 但这时的他,根本瞧不上签到奖励,无奈只能拿来败家。 叮!恭喜您签到九转仙丹×100! 帝九幽眉头一皱,“这不糖豆吗?大黄快过来。” 叮!恭喜您签到至尊帝器九龙天鼎! “嗯,大小刚刚好,拿来煮火锅。” 叮!恭喜您签到混沌神体! “混沌神体?我记得当年一巴掌拍死的那个准仙帝好像就是混沌神体,大黄快过来” 百万大万来犯! 帝九幽:“吞天噬地魔功,给我吸!” 一日之间,帝九幽连破九重境界。 “修炼?抱歉,那是什么玩意?” 雪,满地的大雪……血,满地的血迹……雪和血夹杂在一起,将落雪留情堂弄的杂乱无章。像是刚刚经过一场打斗,双方刀光剑影过后,拼得你死我活,血流成河,人死如山,一片狼籍。程门十四少目睹惨状,咬牙切齿,简直要发疯一般,挥舞手中长剑,大喊大嚷,道:“谁干的?是谁?有种出来!”不为人知的隐秘空间,充斥着众生千万年累计的善与恶的投影,体内伴生着魔界的禁忌之魂的方问,在无尽的生死轮回中,刀碎轮回,为众生重塑生机。山河碎,群雄据,荒兽出,世间乱。 护客楼,天灵大陆上最大的一个护送组织;护客人,护客楼的第一执行人。 执我手中剑,护送天下客! 我为护客人,只为守护一方人!这个世界文道为尊,文人掌文箓,修文气,开文宫。 九品开窍文箓,一目十行,身轻体健。 八品修身文箓,文字加身,如有神助。 七品仁者文箓…… “诗词歌赋,笔墨丹青,棋艺话本这些你都懂?” “略懂略懂。” “都懂一点也行。” “是亿点点……” 官居一品,权倾朝野? 封王拜相,永享荣华? 不不不,身怀国家图书馆全部资料的李长安,无奈接受了,世人把他名字刻进圣庙的事实。 “你说,这个世界上,真的有魔鬼吗?” “当然,你不就是?” “杀人偿命,天经地义啊。”为了救人,穿越古代的赵亨义娶了个克夫的丧门星,一同带回家的,还有丧门星那六个拖油瓶妹妹。 什么?一个媳妇六个小姨子养不活?不存在的! 看我带着乡亲们种田打猎搞副业,偷偷发展高科技,昂首阔步新天地! 朝廷腐朽,皇帝昏庸,不给百姓留活路? 那就掀翻这鸟朝廷,杀了那狗皇帝! 草原蛮族年年寇边,岛国强盗肆虐海疆,西方贼人觊觎中原? 来,豺狼虎豹往这看,看看你亨义爷爷手里这杆二十连响的火铳它帅不帅!
瞎子剑仙,蜀山观像三百年 弑神之劫 玄幻:四域神尊 途录 一不小心留在了人间 烽动 诫殇录 剑缘凌雨 至赖无敌 剑灭王朝 帝君元神魂穿病娇王爷 伊沌 恶的演绎者 我在诡异世界开宝箱 诡谈撰 孤 义 我真的不是女装大佬 强袭饶命 临道仙途 造化万界 狗狗耳廓肿了怎么回事 狗狗耳朵毛长怎么绑 狗狗耳朵上有红色结痂 狗狗发烧温度是多少算正常 狗狗耳狗狗中耳炎的病 狗狗耳螨液什么牌子好 狗狗耳朵上有红色结痂 狗狗耳朵毛怎么长的快 狗狗耳螨视频 狗狗耳朵如何立起来了 狗狗耳朵突然出血了怎么办啊 狗狗耳朵突然出血了怎么办啊 狗狗耳螨照片 狗狗耳朵毛长怎么绑 狗狗发烧喝什么 狗狗发烧温度是多少算正常 狗狗耳朵突然出血了怎么办 狗狗耳廓肿了怎么回事 狗狗耳朵增生手术多钱 狗狗发烧喝什么牌子好 狗狗耳朵毛长怎么绑 狗狗发烧喝什么牌子好 狗狗耳朵增生手术多钱 狗狗发烧温度是多少算正常吗 狗狗耳朵毛长怎么编 狗狗发情几天交配 狗狗耳廓肿了怎么回事 狗狗耳朵增生手术多钱 狗狗耳朵增生手术多钱 狗狗耳螨视频 狗狗发烧温度是多少算正常 狗狗耳朵螨虫什么样子 狗狗发烧喝什么症状怎么办 狗狗发烧喝什么 狗狗耳螨照片 狗狗发烧温度是多少钱 狗狗发烧喝什么症状怎么办 狗狗耳朵上有红色结痂 狗狗耳螨照片 狗狗发烧喝什么症状 狗狗发烧温度是多少钱 狗狗耳朵毛怎么长的快 狗狗发热物理降温方法是什么 狗狗耳朵突然出血了怎么办 狗狗耳朵螨虫什么样 狗狗耳朵螨虫什么样子 狗狗耳朵突然出血了怎么办啊 狗狗发烧温度是多少钱 狗狗发情几天交配 狗狗耳朵上有出血怎么办啊 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 向死者书 武破神灵 鹿行野 神级插班生 重回二十岁,绑定第二系统 百度 百度 百度 百度 百度 狗狗耳朵如何立起来了 狗狗耳朵螨虫什么样 狗狗耳朵突然出血了怎么办 狗狗耳朵如何清洁 狗狗耳廓肿了怎么回事 狗狗耳朵有点血 狗狗耳朵毛长怎么绑 狗狗耳朵上有出血怎么办啊 狗狗耳螨照片 狗狗耳朵毛怎么长的快 狗狗耳廓肿了怎么回事 狗狗耳朵毛长怎么绑 狗狗耳朵螨虫什么样子 狗狗耳螨视频 狗狗耳朵上有红色结痂 狗狗耳朵毛长怎么编 狗狗耳朵毛怎么长的快 狗狗耳朵螨虫什么样 狗狗耳朵螨虫什么样子 狗狗耳朵如何立起来了 狗狗耳朵上有出血了怎么办啊 狗狗耳朵外面有红点点 狗狗发烧喝什么 狗狗发烧温度是多少算正常吗 狗狗耳螨照片 狗狗发烧喝什么症状 狗狗耳廓肿了怎么回事 狗狗发烧喝什么 狗狗耳朵增生手术多钱 狗狗耳朵螨虫什么样 亚星官网 亚星官网 万利官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 欧博官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网