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 in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically.

<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

p>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="span6">
        Level 1 column
        <div class="row">
            <div class="span3">Level 2</div>
            <div class="span3">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>

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>

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: 767px) { ... }
  /* Portrait tablet to landscape and desktop */
  @media (min-width: 768px) and (max-width: 979px) { ... }
  /* 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 hiding 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
可信网络安全广东省网络安全应急平台广州市信息网络安全协会2016信息安全专业排信息安全主要课程苏州正规网站制作公司首页营销企业网络软文营销推广多少钱营销软件代理微博营销的特点是什么意思身边的网络营销有那些营销软件代理免费网站推广重庆綦江网站制作公司哪家专业网络营销品牌含义信息安全暑期教师培训国家信息安全测评信息安全服务资质利用所学的信息安全知识构建一个安全的网络,-1银监会 信息安全标准广州网络安全公司信息安全服务安全工程类一级资质营销公司 上海福州网站制作广州市信息网络安全协会网站建设中心网络安全密钥win 10银监会 信息安全标准苏州正规网站制作公司营销型网站代理常州网站优化创新的网站建站人世间,世间人,想成仙却轮回,生死由命,万般不由人,是蝴蝶梦魂先觉,还是人梦蝴蝶先惊。 时光如白驹过隙从指尖溜走,我见过许多的奇人异事,也见过人间大喜大悲,如若有人问我假如人生重来你会如此吗?我的答案是肯定的。因为我选择的这条路,他有别样的风景……颓废的陆回穿越到20年前的初中,重拾激情。在他奋斗的过程中,历史也悄然改变。陆回不仅成就了一番事业,也获得了众多芳心。风都一个出现了英雄的城市,在假面骑士W打败了最后一位掺杂体后风都又回归了平静。但事情并没有结束。十年后发现的一个遗迹打破了这一静。那是来自黑暗世界的力量,将人们吞噬的力量,将世界笼罩的力量,这一切会由谁来打破呢?是英雄回归?还是光明乍现?等待人们的是臣服黑暗还是奇迹的发生? 刚刚毕业的少年,满腔热血。却意外卷入一起谋杀案件…… 简介无力,移步正文少年翩翩归来,三界为之动容。 神族主宰三界,魔族野心勃勃,狐族足智中立,凡族势单力薄。 神魔大战后的三千年,四海八荒又面临一场浩劫,镇魔神塔昊天塔下落不明,谁能力挽狂澜,保天下太平?主人公慕成二十五年平凡人生的沉淀与积累。 且看他拥有异能后,怎样的处事风格,怎样造就了辉煌的一生,又是怎样一步步发现灵魂的秘密。 面对强大的守护神帕丁,慕成是如何战胜的,他又将创造怎样的理想世界? 宇宙辽阔,却大有人单手灭之,几万年却也似一瞬,一眼便是沧海桑田。提前知道,三年后,末日降临异兽入侵。 身为乡村教师的秦风觉醒遮天修仙法。 开始带领全村族人一起修仙,准备抵御三年后的末日。 “表姐赶紧辞职把回来和我修仙。” “表哥你还要考研,还考个屁呀,赶紧回村修仙。” “城里房子赶紧卖了吧,修仙才是唯一正道。” 要问修仙哪家强,快去村里找秦风。 别人修仙我变强,吃吃喝喝变神王。 “您的族人已突破神桥境,反馈宿主获得百倍修为!” “您的族人已突破神王境,反馈宿主获得大道圣体!” “您的族人已突破准帝,反馈宿主获得极道帝兵!” …… 一个小朋友气恼祖先不争气,于是派了粉红小猪回到过去帮助祖先,没想到……林洛本是灵曜国虎将林烈之子,而林家被林烈兄弟赵柯设计陷害,被昏君一纸诏令株连九族。林落逃过一劫,但也被流放到有着‘禁断之地’之称的阎罗小世界中。哪曾想这里是上古神族战场,在这里林落受辱被弃入神魔井中,却获得神族功法《大炎罗》残本,掌握了阎罗小世界进入天璃大陆的关键通道,从此化名洛幽在两个世界里不断成长。 三年之后,林落携着阎罗小世界万千生灵归来,杀小人,灭昏君,诛妖邪,战七国,改天命,逆长生,一统两界......
专家营销 网络营销学科论文 信息安全的层次化特点决定了应用 中国电信网络信息安全 败笔网络安全技术 北京网站建设第一 网络公司网站 微博营销的特点是什么意思 福建网络安全周 鹤壁网站优化 微信支付 网站建设 网站设计的文案 国内网络安全公司介绍 信息安全测评机构的资质认定 移动网络营销定义 福建网络安全周 网络营销计划 案例分析 瑞士 网络安全 中国信息安全问题日益突出的标志是什么 网站怎么进入后台维护 提供石家庄网站推广 身边的网络营销有那些 营销道理 rsa信息安全大会 2017 鹤壁网站制作 福建网络安全周 姜堰网网站 营销班级 网站内容 本溪网站建设 企业之后网络营销对比整合营销传播的作用 太原推广型网站开发 公安部信息安全 网络安全预警方案网络安全 开发语言 酒店的网络营销活动策划 企业之后网络营销对比整合营销传播的作用 网络安全等级测评 精品课程网站设计 营销班级 败笔网络安全技术