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
邮票网龙邮票邮票收藏价格表大龙邮票邮票图片邮票价格邮票网邮票价格邮票市场邮票互动网一个从地球重生在异界大陆的小人物,获得了一个神界宗派神级系统,后来才知道,系统其实是一个先天神器的器灵,意外从神界通过空间乱流漂流到地球,砸中地球司马轩带着他穿越到天印大陆。、收神体弟子,降妖除魔。从修真界,到仙界,再到神界、从此开启了一个不一样的人生。一卷封神榜,一座封神台,为异界带来一个异数,也是一个变数,掀起波澜壮阔的江湖烽烟。五百年必有王者兴,三千载则当圣人现,一万年沧海桑田,阴川之下,造化之工,天照点将,揭开三千年后封神大战的帷幕。龙啸九天,正心泯仇;凤鸣寰宇,修身弘愿。封神榜起,封神台终,登天梯下,上演着血与火的恩怨情仇…… 贫道纯属虚构,如有雷同,你能咋滴?拔刀吧——人生赢家!一个普通的小人物,在新时代的背景下,如黄河之沙默默无闻,做着自己喜欢的或者不喜欢的生活。在世界需要帮助的时候他们也会如同恒星般散发自己的光芒,哪怕最后无人所知籍籍无名。灵兽人程森屮(che四声)十一岁丧母,十三岁遭灭族。程森屮,程猖,程狂兄弟三人幸存。一年后大哥程猖却操纵程森屮杀死小时密友和程猖,心灰意冷的程森屮消失了三个月后在长安佚名“山狼”靠杀人赚钱。两年后,“山狼”声名崛起无意间认识权门高氏二公子和洌氏二公,这时有人叫杀死两人。山狼不从,没曾想那人正是大哥程猖。几经挣扎后,山狼坠于程狂和卫天兰坠落的黑鹰崖。 十年后 顶级杀手——山狼,再次出现在高风舌眼前。 正义也许会迟到,但永远不会缺席。末世的日子不好过啊……少年为了保护小师妹从深山走出,左手悬壶济世,右手飞针杀人,赚钱救人两不误。 不管权势滔天,还是富可敌国,在我面前都须低头。 尔等记住,若我避世,群雄并立,若我入世,天下无双! 穿梭无数的世界,连接无数的故事。 万界唯一并非绝对的道路。 这是属于王黎们的故事。一句话介绍:小说是章回体体裁,以性格孤僻的刘宏图为视角,讲述了一群九零后的成长故事。 故事梗概:故事前期以友情为出发点,讲述刘宏图在读书时期收获的各个朋友以及发生在他们身上的或荒诞或真实或匪夷所思却又在情理之中的一系列故事。小说中后期则以宏图追逐梦想为主要线索,与朋友们的成长历程交织在一起,同时,整部小说的悲剧色彩已愈来愈重。 分章大纲:1-41章:宏图读书阶段,身边有一群性格鲜明的朋友。42-73章:踌躇徘徊(少年们的迷茫与惆怅)。74-100章:一路坎坷,一路悲歌。张秋,一个平平无奇的植物人,一觉醒来却发现自己诡异地回到了青年时代当起了大学教师。 与此同时,神秘的教师黑科技系统从天而降,一群令人头疼的学生随之而来。 能源革命、空间技术,一切的一切因此而变得不同。 这一切,是巧合奇遇,还是另有阴谋? 当数据的洪流将虚实分割,当钢铁的尖利刺穿胸膛,当虚幻与现实交织,当过去与未来缠绕。 漫长的凛冬将至。 然,我与旧事皆无憾,来年依旧迎花开。 浩劫动荡之后,终见春暖花开。 林逍遥穿越到妖魔神佛并立的异界,开局统死机,被困十里坡刷了十年怪。十年后,系统重启,踏入江湖。竟发现自己能看到别人头顶的血条!且只要让对方掉血,就能获得经验值,抽取宝物!比如能够强行聚灵且强制击飞敌人的【聚灵小手套】、一戳就算钢铁直女也能变娘的【娘娘枪】、套上就能隐身的【丝袜头套】、包治百病的【药王身上搓下的泥球】……
上海邮票网 邮票市场 香港回归纪念邮票 民居邮票 邮票市场 邮票收藏价格表 女幽灵 百度网盘下载 迅雷下载 欧美群迅雷下载 邮票网 十二生肖邮票 世界上第一枚邮票 上海邮票网 欧美群迅雷下载 纪念邮票 邮票互动网 邮票 邮票价格 欧美群迅雷下载 邮票行情 生肖邮票 邮票行情 鸡年邮票 中国邮票 生肖邮票 猴年邮票 中国邮票 上海邮票网 鸡年邮票 邮票市场 大龙邮票 邮票吧 邮票图片 女幽灵 百度网盘下载 迅雷下载 上海邮票网 香港回归纪念邮票 生肖邮票 文革邮票 邮票吧 邮票行情 生肖邮票 这都是你们逼我的在修仙界活下去都市晨阳你好次元洪荒之梦回逆天改命之最强圣人普泽林大陆不死狂医娱乐:这明星能处,有钱他真捐神医龙婿我一人挑翻万族我变成了鬼!异世界:我的吸血鬼老师来生梦:鬼续缘边疆:边防军龙族监察军世纪之风一品布衣下一站,是否有你重生:初中生日记吃货入侵原始世界实木地板厂家请复制到浏览器打开 北京搬家公司哪个好 仓库码货每一层怎么算 欧亚达 沙发平拍 玻璃瓷马桶 振星货架 衣柜玻璃 华新水泥价格 窗帘+柯桥 北辰佳园里房价 自动马桶盖 家具 京东 水波工字折视频 摩恩卫浴 马桶排污 方太油烟机价格 提花窗帘 窗帘羽毛纱 马桶浴室柜 宝鸡小区 衣柜门色卡 活动隔断屏风厂家 潮州二手房 伊梵衣柜 房价网 多功能仓库 吸塑衣柜门 环保吗 龙港房价高 北京小区底商宠物店转让 购买沙发 科凡衣柜怎么样 蜀麓苑房价 简欧 沙发 木质 皮质 华润漆价格 沙井货架 柏木家具好不好 昆山杨树路房价 镂空正水波裁剪方法图 埃尔森卫浴 大众搬场电话 北京品牌搬家公司 窗帘装饰 青岛搬家电话老字号 梅州货架厂 绒布沙发 灰怎么清理 特欧斯卫浴 上海窗帘布 浴柜板厂家 九江二手房 康丽宝厂家 萧山卫浴厂 宏泰浴室柜 金色港湾别墅房价是多少钱 贵阳小区 鼓楼区四大街丰财小区的来历 精品货架批发 铁拉门厂家 杜菲尼马桶 楼梯厂家 好太太马桶 喷泉泵价格 仓库效率 翡翠貔貅价格 上海个人搬家公司 弗雷德小区 宁波房贷利率和房价变化图 沙发设计 老板油烟机价格 桂林二手房 pvc材料生产厂家 不锈钢栏杆价格 搬家公司的人有力气吗 电热膜地暖价格 郑州搬家公司的电话号码 穗宝床垫价格表 东城搬家公司电话号码 木包铝厂家 东南亚风格家具 广州电话企业 荣事达卫浴 国产窗帘 多芬浴室柜 北京箭牌卫浴 伊思特衣柜 雨虹防水材料价格 悬货架 仓库货架货物摆放技巧 搬家公司广州 加气混凝土砌块价格 福州房价网 山东纸坊房价 宁波的搬家公司 地漏价格 胜芳货架厂 2014全国房价排行榜 南京搬家公司电话 车库自动卷帘门价格 上海正规搬场公司电话 沈阳搬家电话 马桶盖厂家 布吉东站附近搬家公司 办公家具 价格