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
猴年邮票女幽灵 百度网盘下载 迅雷下载奥运邮票中国邮票价格表龙邮票世界上第一枚邮票文革邮票香港回归纪念邮票邮票行情南京文交所钱币邮票交易中心热血的战争,痛苦的坎坷。 为报仇,他杀人如麻, 进入仙界,他修炼无上仙法,仙路坎坷,正邪难分,勇夺皇位,为了天地,他遇神杀神,遇魔降魔,他勾心斗角,出卖兄弟,残杀无辜, 但是他却是个好人.......看似平静的世界中,有人身负法则之力,有序运转的法则之下,埋藏着鲜为人知的阴暗面……朝为田舍郎,暮登天子堂。 崔峪穿越古代,本无心仕途,只想在这盛世年华平安喜乐,但时代洪流岂容你独善其身。 他从纨绔败家子到朱紫重臣,体会着王朝日隆、晃晃盛世,也感受着繁华之下的暗潮汹涌。 这是最好的时代,也是最坏的时代,更是崔峪的时代。 要风流,更要天下太平,要步步生莲,更要乾坤涤荡。 崔峪发出怒吼:“我的时代我做主!”特种部队猛虎作战旅的战士梁建华外号海蛇,在一次军事演习对抗中,因被对方的炮弹击中,无意间穿越回到百年之前的1910年东北,在匪患猖獗的环境中,制造现代化武器,尽显卓越能力,并且左右逢源,获取佳人芳心,收编其他武装,对抗国外侵略,最终成为一代英豪…为你,我悔吗?亦木墟历练归来时见到家族覆灭,发誓欲要血刃仇敌,报其家恨。 闯秘境,夺至宝,守边疆,战万族。 沧海一粟,修行千秋,蝼蚁尚且贪命,诸天生灵皆在争渡。 一颗黑球可炸山镇海,一杆长枪可斩万千神明。 是非对错唯有强者定义,弱者只配臣服。 武道九重,上为天地境。 当末法时代结束,修行元气重归上古。 整个修士界,皆因亦木墟的一颗轰天雷,即将暴走...为人师者,授徒的最高境界就是青出于蓝而胜于蓝。 可李棋不这么认为,因为坑爹的师徒系统,无论是神功秘籍还是法宝丹药……居然全都只有徒弟的份! 教出来的徒弟一个比一个厉害,自己却还是个弱鸡该怎么办? 危险重重的世界,一个没实力的废柴宅男又该怎么自保? 在线等,急! …… 于是李棋想通了,既然自己不能变强,那他就要教出一批可以保护自己的最强徒弟! 收徒法则第一条:天大地大师父最大! 李棋:“少年,你渴望力量吗?那就当我的徒弟吧!”时代变迁、科技发展,当蓝星已经越来越无法满足人类发展的需求时,宇宙大航海时代呼之欲出。 大学生刘传无意之间获得了超级文明种子,从此带领天河文明走出蓝星,探索星辰大海!颓废的陆回穿越到20年前的初中,重拾激情。在他奋斗的过程中,历史也悄然改变。陆回不仅成就了一番事业,也获得了众多芳心。吴清穿越到皇朝林立的万朝大陆,这里万朝争霸,战乱不堪。 穿越而来的的吴清身为大禹皇朝的王爷,却终日沉浸在书阁之中。百官弹劾,言官嘲讽。就在大禹皇朝危机之时,吴清却挺身而出! “什么!这大雪龙骑竟是景王的私兵?!” “还有这燕云十八骑?为何可以以十当万?!” 百官惊骇! 吴清:不装了我摊牌了!我一个人就能一统大陆!
上海邮票网 中国邮票价格表 欧美群迅雷下载 邮票收藏 邮票互动网 中国邮票价格表 邮票市场 邮票市场 民居邮票 邮票价格 邮票 邮票交易所 女幽灵 百度网盘下载 迅雷下载 南京文交所钱币邮票交易中心 邮票交易所 邮票吧 邮票互动网 鸡年邮票 南京文交所钱币邮票交易中心 女幽灵 百度网盘下载 迅雷下载 上海邮票网 中国邮票 中国邮票价格表 猴年邮票 十二生肖邮票 邮票网 邮票市场 邮票互动网 中国邮票价格表 龙邮票 邮票交易所 邮票吧 邮票互动网 鸡年邮票 南京文交所钱币邮票交易中心 女幽灵 百度网盘下载 迅雷下载 上海邮票网 中国邮票 中国邮票价格表 猴年邮票 神迹之超能战警重生最强丹帝末世:开局战地崛起冷宫拔剑三百年,我成了绝世剑仙重生之剑神无形逆苍玄开局我就不是人了?!这个世界不需要影帝我真的是正派:开局抢亲女帝西游灵明鸦从假太监到真皇帝超品鉴宝师光冥天星绝!颜成仙之前我穿越了自己的小说重生之后变修狗风起青玄南京,抱紧我!宿命与初心汽车仓库设计图请复制到浏览器打开 百叶木衣柜 乐从搬家公司 搁楼式货架 沙发 品牌 靠垫 好 家用窗帘 工作台货架 浅水湾小区 浴室柜用途 pvc价格 红木家具吧 窗帘正水波的裁剪方法 江北区公寓房价格 定制家居 整体衣柜 u型仓库图 益有衣柜 客服电话 圣马克 沙发 重庆市南岸区近商圈的小区 北京北辰搬家公司电话 卫浴厂除尘 窗帘水波的安装 窗帘布图片 四川家具 防盗门厂家 衣柜 挂衣杆 长度 沙窗料厂家 卫浴室用品 卫浴保修 多玛地弹簧价格 洁具卫浴10大品牌 意牌卫浴 仓库有哪些类型 卫浴盆批发 八里街房价2500 衣柜新闻 冲马桶标志 大庆58同城二手房 红星美凯龙家具城 铰链厂家 新泰卫浴 窗帘三角水波帘头 不锈钢水槽厂家 工厂仓库规划设计 木材厂家 膜结构车棚价格 西方古典家具 进口马桶盖 安阳小区 长沙现在的房价均价多少 吉庆里小区 北京家具网 衣柜 滑门 佛山南海区中海锦城房价多少 沙发家具厂家 厂家直销批发沙发垫 不锈钢水塔价格 衣柜 后悔 到顶 呆扳手厂家 济南 衣柜定制 铝银浆厂家 沈丘房价 成都龙泉蚂蚁搬家电话 grg厂家 钛金货架 全玻璃衣柜 办公家具租赁 马桶窑炉 高平二手房 贵港小区 马桶连面盆 衣柜活动 中宇卫浴 马岛马桶 浴室柜3d 广益卫浴 启高浴室柜 客厅沙发1 2 3位怎么摆 全国房价 浴室柜招商 悬浮式拼装地板厂家 电脑价格查询 乐从家具 衣柜 toto卫浴 中山房价 沙发图片 拆惠安小区 桑拿沙发 天洋城房价 搬家打电话邀请怎么说 窗帘连体水波怎么做 东莞搬家公司电话 窗帘水波的剪裁公式 toto马桶维修 甲醛 衣柜 梅花表价格 南宁衣柜厂 东堤港小区 坐蹲两用马桶 三替搬家电话 沙发 茶几 颜色 马桶盖代理 中间有梁的水波帘头