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
常用的信息安全技术安吉做网站娱乐营销的优点学好网络安全法规 短信北京搜索引擎营销外包营销推广的功能美国信息安全博士上海定制网站建设公司哪家好外贸网站制作网络安全条例的是互联网信息安全要求信息网站显示百度地图互联网营销平台北京网络营销博客网络安全服务机构资质无锡网站推广网店营销推广企业网络整合营销公司重庆网络营销哪家好营销 qq昆明高端网站设计国家信息网络安全sem搜索引擎营销案例企业网络安全加固网络安全形势严峻乐清企业网站建设广州专业网站制作哪家专业合肥做网站的价格Ios网络安全做网站价格网络广告的营销作用   修仙界至尊医尊徐辰,重回到了地球当实习医生的日子,自此改变他的人生,再努力重返仙界。   他有医死人活白骨的医术本领,在都市生活里逍遥又快活。   富家女,青梅竹马,女记者,老师……   都成为了他的崇拜者。   我命由我不由天。   一剑指苍穹,快活人世间!   我笑这苍生都在我脚下,皆为我臣服!     穿越到古代,家中一穷二白! 不怕,运用21世纪的知识,随便搞点发明创造,改善家中生活! 一不留神富甲一方,漂亮老婆天天催着纳妾,小日子不要太幸福! 蛮族入侵,那就组建骑兵,制造火炮,打他丫的! 影响我平静的生活,敌寇虽远必诛!新月国大陆,宗门多如沙子,强者无数,凡间位面无数,一个渺小家族的子弟,因机缘巧合,得一个无名方石,觉醒武道天赋,在阵法,炼丹,炼器,符文,血脉传承成为一名妖的存在,与各个天才妖孽无上比拼,武道不局限于人间,一掌手握苍穹,一脚踩于整个大陆,浩瀚星空,无数位面,轮回天道,以武逆神明,以武修炼神,一掌一脚震杀亿亿万名星空宇宙神明,黄泉地下之鬼神。男主明子皓是一位刚刚毕业的大学生,刚刚打算步入社会的他在一次偶然的机遇下他发现了不为人知的秘密,他的人生从此发生了翻天覆地的变化……原本在地球上生活的宅男陈轩穿越异世大陆,获得了一个徒儿养成系统。 “什么?这个徒弟又有大帝之资??” “啊?你要问我有多强大?别问!问就是我无敌于世间!” …… 【单女主】+【无敌流】祝南穿越异世,发现自己竟然能看到未来。 于是……祝南你为什么说我要说的话?你是我肚子里的蛔虫吗? 祝南你为什么知道我的事? 抱歉抱歉,祝南表示自己可是神算子。在这人间地狱里,你是我永远不能实现的梦。古老的邪灵世界上,我以武道立足于世。杀其邪灵炼其血收其魂,拯救苍生。开起不一样的侠客之旅,铸造无上大俠威名。神话神兽,寻得九影,路途艰辛,似已西游记一起手法奇特的杀人碎尸案,让一个青年从大学时代追查到自己投身公安刑侦工作,整整十二年; 从一开始的道听途说,到后来闲暇时间就一头扎进尘封的档案室,一遍一遍,一页一页在蛛丝马迹和事实证据中追踪着凶手; 金陵,黑暗中到底隐藏着多少不为人知的秘密? 你是否有足够的智慧和主人公一同去追查那个消失在茫茫人海中的恶魔?
上海定制网站建设公司哪家好 上海的外贸网站建设公司 网站防复制 山东网络信息安全协会 网络营销的竞争分析报告 先进网站 网络安全前言 网络安全工作创新 创建免费网站 福州建网站 做网页 sem营销策划方案 口碑营销百度百科 苏州做网站推广的公司哪家好 网络安全法 网络攻击 东莞全网营销网络推广模式 信息安全等级保护政策培训教程下载 网络安全侦察 网络安全应注意几点 有关网络安全的logo 整合营销公司简介 网络自由网络安全 网络营销的竞争分析报告 网络营销腾讯案例分析 网络安全大学排名2017 苏州网站推 网站防复制 b2b外贸网站 饥饿营销流程 吉安做网站 营销竞争力 网站设计品 龙岗 网站建设深圳信科 馆陶网站建设 怎么把网站黑掉 上海有名的做网站的公司 购买b2c网站 网络安全产品解决方案 禅城区网站建设公司 北京搜索引擎营销外包 品牌网站设计