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
民居邮票大龙邮票欧美群迅雷下载邮票行情南京文交所钱币邮票交易中心中国邮票世界上第一枚邮票邮票图片邮票互动网世界上第一枚邮票顾楠穿越平行世界,此世文娱不复前世繁华,正值百废待兴之际。   一首歌,顾楠拉来千万投资!   执导第一部电影,轰动整个娱乐圈!   导演、写歌、小说……   以前世文娱之繁华,顾楠创建了此世最富有盛名的文娱帝国! 《大美宝鸡》是严肃文学作家勤静忍(本名强飞龙)创作的游记散文集,本游记散文集?收录了多篇描写宝鸡大好河山与名胜古迹的美文,每一篇美文的写法与风格都不尽相同。 人们常说一花一世界,一叶一菩提,宝鸡是中国的缩影,一个小小的宝鸡便能窥见中国的全貌。宋末,蒙、金、宋战乱不断,南宋李庭芝、李继先、张世杰三位从小长大的兄弟,一起读书、练武,心怀大志,有勇有谋,共同投身于保家卫国的行列,李继先先后结识了诸如余玠、杨亮节、李芾、王坚、文天祥和陆秀夫等名臣名将,又结识了诸如慧通、玉虚三仙、桃源四剑、潇湘剑客、剑南六洞仙等江湖豪杰,他们虽然出身不同,性情和志向各异,但最终都聚合到了抗敌保国的队伍中,他们忠心于国,侠义冲天,文武超群,在政治与江湖间穿梭,同奸臣、叛徒、敌军、仇人不断对战,最后随着南宋的一路失败和灭亡而纷纷牺牲,余留之人最后看到元朝新生气象后,感到天下一统是民心所向,便顺应大势,退隐山野。受气包苏凡意外获得神医传承,从此悬壶天下,济世救人,走上人生巅峰。 林筱然:“受气包,我脖子有些酸了!” 苏凡:“老婆,我这就帮你捏捏,你千万别动气!” 见苏凡如此乖巧,林筱然眼中满是笑意,成为绝世医仙又如何?还不是要乖乖听本小姐的话? 苏凡欲哭无泪,自己这辈子怕是躲不开这小魔女的蹂躏! 民国初年,江沪青年司机玄狐,在驾驶车辆走夜路时,因碰撞阴魂煞气而丧命! 在九重天阴司府投胎审核寺,玄狐的鬼魂遇到此处监官铭难改等神仙,在进行投胎运程实验游戏,玄狐有幸被挑选参加这个游戏! 从此,玄狐开始扑朔迷离、危机四伏、艰苦卓绝、无穷无尽的换回磨难历程......一介凡夫俗子身负血海深仇,凭借一己之力搅动仙凡风云,诸位道友,仙途不远,且看唐骁年如何霸临天下!一个屌丝大叔无意间触发穿到别的世界,发现年轻了假如在这个世界上有如果…欢迎光临山海小馆 我是店长夏勉,这是我们的菜单 凉菜有 醋溜荀草 凉拌夔牛肉 酒糟女丑蟹 卤凤翅、鸀鸟肝、鹿蜀筋拼盘 …… 热菜有 汽锅重明 红烧毕方 麻辣文贝 黄焖鳡鱼 仙蔬什锦 …… 点心有 荔枝甘露饼、珑缠桃条、酥胡桃、缠枣圈、缠梨、香药葡萄、缠松子、糖霜玉蜂儿 …… 酒水有 帝女浆 禹王台 山神祭 瑶池醉 醴泉冻 …… 都是仙酿,刑天喝了都说好。 哦,对了,招牌菜是鹿蜀宴,宜子孙哟…… 您看要哪个? 九尾狐后厨露头,呼救:“厨子,我和鱼干起来来了!” 夏勉处变不惊,面露微笑,“您稍等。” 转身掏出大禹治水时用的定海神针,走进后厨。这里是个多彩的世界,温情的世界,现实的世界,血腥的世界。极北冰垣、泊纳格岛、诡异的腥魂森林、神秘的迷零森林、残酷的努乐哈拉大沙漠、毒气弥漫的蛮荒沼泽,神级魔兽紫羽玄鸟,超级神兽赤须青龙…………主角将在这个世界重生,开始他的峥嵘旅程。
民居邮票 女幽灵 百度网盘下载 迅雷下载 邮票 世界上第一枚邮票 中国邮票 香港回归纪念邮票 十二生肖邮票 纪念邮票 大龙邮票 上海邮票网 文革邮票 奥运邮票 邮票价格 南京文交所钱币邮票交易中心 香港回归纪念邮票 上海邮票网 猴年邮票 鸡年邮票 邮票图片 第三轮生肖邮票 十二生肖邮票 纪念邮票 邮票交易所 邮票市场 邮票收藏 鸡年邮票 邮票行情 邮票互动网 邮票行情 生肖邮票 邮票吧 龙邮票 邮票互动网 邮票收藏 欧美群迅雷下载 上海邮票网 南京文交所钱币邮票交易中心 中国邮票 中国邮票价格表 邮票收藏价格表 朱元璋:开局重生明末,横推女真!殉道之人陌神界荡涤魑魅除魍魉缉凶者齐天大圣再战西游九域覆灭录爽!时空淘宝让我成为人皇吃鸡之存亡时刻由黄昏到黎明我的世界之颠倒模组在古代成为全才很正常吧洪荒:赠送九转金丹,返还百亿功德我真不是细作走过云端人在娘胎:我和女帝相爱相杀让你举报无良中介,全判刑了?异世界:法师之路掠夺诸天万界的生存之旅大周风起亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星游戏官网 【薇-電1322 8888 433】皇冠登3出租 【薇-電1322 8888 433】皇冠登3出租 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 皇冠登3出租 薇-電 132-②⑧⑧⑧-8433 【薇-電13228888433】皇冠登3出租 Lets快连 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快连VPN - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快链下载 - 上海曲德曲网络科技有限公司 快连官网 - 上海曲德曲网络科技有限公司