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
深圳 企业网站建设软件与信息安全学院wifi信息安全信息安全杂志有哪些内容,-1手机端网站设计网络安全与黑客的关系seo精准营销如何网络安全建设菜鸟腾飞 无线网络安全攻防 网盘信息安全竞赛官方网站信息网络安全 考试五金 网络 推广 营销南宁网站建设教学美橙网站维护信息安全管理体系内审珠海专业网站建设价格网络安全中CIDF英文缩写网络安全小工具网络营销产品类型网络安全产品介绍建站营销信息安全服务资质咨询中心,-1江苏网站制作企业美橙网站维护万网站建设网站推广营销案例日本国家信息安全战略网络公关营销公司网站设计公司 无锡网络安全编程的特点小马哥,血战死亡后被万千影迷惋惜,然后复生到鞥司世界,与大学新生马可融合。讲义气的大古惑仔和大学生,不友好的开局,没有提前量的信息集成,只是一个小小锦衣后人。为了寻找失踪的父母,马可只能不断变强,异能者的动乱,外域的强者.......高武世界,人妖并立,人族式微,人奸横行,比妖兽更可怕的是人心,且看小人物罗文辉在逆境中成长,杀皇证道,成就人族守护神的故事。广袤无垠的宇宙,充满了未知,仰望星空,生命的源头在那一颗又一颗美丽的星辰上跳跃……乔榆进入元宇宙里世界,获得了隐藏职业亡灵法师。 奈何开局智力精神都为0,还抽到了一个十分奇怪的天赋。 乔榆一怒之下,属性点全部加力量! 谁规定亡灵法师就不能和人肉搏的? 看着一拳打死世界之蛇耶梦加得的乔榆,里世界的玩家都疯了。 “大哥,求求你别跟人肉搏了!你是一位亡灵法师啊!求求你召唤个亡灵吧!” “这哪是亡灵法师,这踏马是六边形战士啊!” 意外的相遇即是缘,来一片只有游戏里见过的仙界!!!!谁对谁错都不重要,只是站队不同罢了。我本路人无力参与奈何明月照我身。。。。窝囊废赘婿冯一洵,无意中得到天师传承,成为最后一名天师。 面对出轨的妻子,无情的岳母,比自己更窝囊的岳父。 冯一洵从此开启了不一样的人生。 妻子:老公,其实那是个误会。 岳母:一洵,妈妈真的知道错了。 岳父:哥,咱俩以后就当兄弟处!刘昊穿越到了大唐,大明,魏蜀吴三国并存的世界。 还成了实力吊车尾的蜀汉后主刘禅 吊车尾怎么了,蜀汉国运衰落又怎么了? 刘昊直接到大唐当起说书人,将赵云长坂坡救主的故事变成自己带着赵云杀穿长坂坡。 什么饮马瀚海,封狼居胥,直接扣在自己头上。 靠着历朝各代载入史册的事迹,直接在大唐封神。 什么独步天下李元芳,神探狄仁杰,应梦贤臣薛仁贵,纷纷收入麾下。一个女孩的日记,练手的他曾纵横诸天,为万界最强者,曾有大能将他作为毕生信仰,也有种族将他视为至高之神,浩瀚宇宙,如他指尖尘埃,无尽星河,不敌他弹指之间,仙界众仙为他惊惧,满天神佛匍匐于他身前,曾有佛,因他跌落莲台,亦有仙,因他撒血云天,如今,他借岁月归来,化身少年。 不是意外,房东东因为幸运而被甄选,却只成为魔法星界的普通居民。设定小目标就是环游魔法世界,见识什么叫快乐星球。然而风云变幻,魔团会、族老会、真理会与皇经会几方势力暗流汹涌,无意身处其中自己也狼狈不堪。既然如此,那便是登上魔法的最高殿堂重权话事,宵小退散。
网站建设策略 合肥网站制作 广东手机网站建设费用 郑州网站设计 南宁网站建设教学 数据中心 年度网络安全检查报告 哈工大信息安全854复试 网站进度表 莱西做网站 南宁网站建设教学 信息安全杂志有哪些内容,-1 企业网站建立哪 广东营销网站建设服务公司 sdlc 信息安全 哈工大信息安全854复试 信息安全宣传周 武汉专业网站做网页 网站站欣赏 互联网营销证书问答营销的营销 思路 中山移动网站建设报价 网络营销优化顾问 网站进度表 信息网络安全 考试 网络安全知识测试 什么是电子网络营销 今日网络安全事件 青岛网站建设培训 网络营销优化顾问 北京建设网站的公司 德惠网站 智能手机网络安全 网站建设联系电话 网站酷站 赣州网站推广 网站首页设计 菜鸟腾飞 无线网络安全攻防 网盘 做网站的软件 保定设计网站建设 营销qq怎么推广方案 网站进度表