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
邮票收藏第三轮生肖邮票民居邮票上海邮票网生肖邮票女幽灵 百度网盘下载 迅雷下载邮票行情第三轮生肖邮票南京文交所钱币邮票交易中心邮票图片“你写下的愿望都将成为现实,但是……”星野辉本身是一个平常的中国籍日本高中生,却莫名转学到了中国,与谜一样的可爱妹妹独自生活在Z市,自己身体里也藏有谜一样的事物,面对突如其来的灾难,他站出来为了人类的未来,为了这个宇宙的安宁,星野辉开启了他的无限深空之旅21世纪末期人类在经历了“姆源时代”后大部分工作已经被人工智能取代,“万灵”这款沉浸式游戏应运而生受到全球追捧。 一个在现实世界因为残疾灰心失意的年轻人终于在“万灵”中找到了心灵寄托,可谁知在新版本更新后“万灵”中的人竟再也无法回到现实,游戏中的生死同样决定了现实世界中人的生死...... 万灵之域,七国共域,战火与辉煌,魔法与热血...... 魔窟,鬼洞、深渊......越是探索越发现万灵大有隐秘,被数据表象包裹的诡谲事物下究竟隐藏着什么真相,外星文明的介入又究竟代表了什么?究竟是人类的进化还是异族的屠杀? 妄想成神的人终究要付出代价...... 元宇宙时代,机缘巧合之下,大一学生林泽成为了一座鬼屋中的扮鬼NPC,意外发现自己工作的鬼屋竟是一场真实的杀人游戏。 明明是残忍血腥的鬼屋,却被他玩出了奇怪的画风...... 林泽:一名真正敬业且专业的NPC,不仅要吓人,还要能吓鬼。 鬼屋众鬼:你不要过来啊——何为末世?丧尸?魔怪?虫族?不!唯有当人类所恐惧的,所崇拜的,甚至是所幻想的一切都成为现实之时,才是人类真正的末日!灵气回涌,信仰重铸,这是神佛妖魔的饕餮盛宴,也是人类有史以来的最大浩劫!丧尸,异形,贞子,怪形,妖精鬼怪,神魔仙佛,这一切的一切,都将降临于世!这是真正的末日,这是末世……神魔纪元!——————这是不冷的第四本书,已完本三本共1500W字小说,无太监,人品保证,新书期急求支持!加更规则:打赏满100加更一章,鲜花满1000加更一章,加更的章节会在上架后爆发!神域之中,远古文明最璀璨的便是十方界。十方界由十个独立的大世界组成,分别是东西南北四界,天地玄黄四界,神界与灵界。故事的开始,发生在地界大陆一处偏远的城池——天羽城,故事的主人公少年轩月一觉醒来,发现身边的一切都变了,自己不在地球,而是一个陌生的世界!为了活下去,为了回家,他被迫走上了强者之路!!!星际时代,随着科技水平停滞不前,人类在与万族的争锋中遭遇大败。 内忧外患之际,有人通过一款直播节目,惊奇的发现,在流放重刑犯的星球中,竟然出现一个叫易辰的绝世天才。 他自创一门修炼方式,创造出了一套又一套不断颠覆人类各行各业,甚至能让人类寿命提升,进化成高等人类的功法。 为了能够偷学易辰创造的功法,全人类不惜代价,三十六计轮番上阵。 为了阻止人类进化成更强大的种族,万族和万族培养的内奸,也是手段用尽,千方百计的阻扰易辰创造出更强大的功法。 易辰,成为宇宙大战的风暴中心。 谁也没有想到,无论是偷师,还是成为易辰的绊脚石,都是需要付出代价的……谁说修仙一定是人,谁说冷血不适合修仙,白蛇凭刻苦努力不断升级修炼日本留学生竹下青禾为了完成父亲遗愿来到中国找寻祖母小林惠子,通过小林惠子昔日战友和爱人的讲述以及小林惠子留下的日记本,逐渐揭开了那段沉重的历史篇章。腾龙大陆。   万族林立,人以强者为尊。   而肖不易的身份却是反派,和主角王岩所对立的反派
世界上第一枚邮票 欧美群迅雷下载 大龙邮票 南京文交所钱币邮票交易中心 鸡年邮票 猴年邮票 龙邮票 邮票吧 邮票市场 邮票图片 邮票吧 邮票行情 女幽灵 百度网盘下载 迅雷下载 邮票收藏价格表 鸡年邮票 第三轮生肖邮票 第三轮生肖邮票 大龙邮票 十二生肖邮票 邮票网 邮票网 奥运邮票 中国邮票价格表 世界上第一枚邮票 中国邮票价格表 鸡年邮票 龙邮票 邮票吧 欧美群迅雷下载 女幽灵 百度网盘下载 迅雷下载 民居邮票 邮票价格 大龙邮票 猴年邮票 大龙邮票 邮票图片 龙邮票 邮票市场 中国邮票价格表 欧美群迅雷下载 夺宝龙城复仇传努力是为自己将来铺路造梦无双花果山篇界桥虚无星海图重生之黑蛋逆袭之路御魂魔神MC之创世神祝秦刀行都市之龙魂战神大颜讨顺传人在江湖之七种歧途天道五千年一剑神仙修真界旅游日常之度日如年玄色录之古色事记在末日里当丧尸宗主真乃神人也少年踏剑行弱不禁风召唤师南昌房价请复制到浏览器打开 防火板价格 杭州价格网 仓库高层货架平面图 上海 家具公司 仓库货架区隐患 小型挖掘机价格 威达 衣柜 蚂蚁搬家招聘信息电话 浴室柜展厅 衣柜挂衣服 水果货架期 绍兴窗帘店 修马桶漏水 衣柜进书房 房价 走势 浴室柜 特价 橡木 生态门厂家 各类货架 定做窗帘 洋桥搬家公司电话 浦东新区国际搬家公司 徐州小区 衣柜 业务 奥地利水波帘 河南南阳房价走势2014 家具定制网 无锡搬家公司电话号码 窗帘配件价格 卫浴柜 太平洋心怡小区 山东厂家 蜂巢帘厂家 面盆马桶 观澳园小区 豪华窗帘 沙发椅子 石材卫浴 嘉兴办公家具 惠州市南光小区有?]有房子出租 门头沟二手房 樱桃树价格 重型货架直销 马桶盖拆 浴室柜有实木的吗 定装窗帘 货架选择 搬家公司规定 定制整体衣柜 儿童整体衣柜 水波窗帘为什么对不上 中国城市房价排名 绍兴窗帘 新泰和整体浴室柜图 雁塔区的搬家公司 16gu盘价格 窗户和窗帘 昌平搬家公司 窗帘水波幔头 顺义搬家公司电话号码 别墅窗帘 马桶陶瓷体 天猫衣柜 杨柳青小区改造 永定搬家公司电话 二手仓库货架 窗帘的分类 厦门货架子 森力不锈钢浴室柜加盟条件 窗帘电机价格 沙发 牌子 水曲柳家具的优缺点 混凝土搅拌机价格表 永康哪里有铁皮更衣柜卖 佛山陶瓷厂家 箭牌 洗衣柜 八角管厂家 水波尺 有用吗? 通风管厂家 北京房价会降吗 搬家公司收费 常乐小区 白云区搬家公司电话 沈阳仓库货架厂 卫浴的前景 广州专业人人搬家公司电话 家具木材 货架图片 品牌卫浴 马桶水箱图 航标浴室柜 2015年沙发盖布 沧州御景国际房价 中档浴室柜 厂家家具 帽儿山房价 在哪里找搬家公司 成都 买衣柜 上海蚂蚁搬场客服电话 沧州小区 马桶有多重 旧宫搬家公司 家具饰品