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
网络安全检讨书Ios网络安全信息安全产业体系网络营销方案撰写成都高端建设网站海尔公司的营销渠道四川信息安全培训网信办网络安全技术局网站大模板真流量海淀网站建设禅城区响应式网站信息安全业务服务资质网络营销人才供需状况网络安全侦察广州专业网站制作哪家专业营销综合平台首页营销的全国信息安全大赛2016口碑营销的例子维护信息安全主要保持营销信网络安全局长广东做网站策划营销推广的含义哪个部门负责信息安全团队营销案例网络安全法 从业电子化营销信息安全教育内容2016口碑营销的例子当高等文明的科技繁衍到巅峰。 迈入到新的纪元历程。 玄能纪元历001年,借助庞大的宇宙资源能量合成改造系统。 高等文明的智慧生物,掌握了宇宙中不该被觊觎的玄能。 从此宇宙中开始频繁出现虫洞,导致时空错乱,平行世界相连! 被高等文明控制的宇宙暗物质暗能量,犹如细菌病毒,开始蔓延到宇宙的各个时空! 威胁程度足以波及到整个宇宙空间的浩劫随之而来……本书又名:《炒股致富真是太难了》、《韭菜的自我修养》、《如何不被股市绿》、《技术流&amp;amp;价值投资流的选择》、《亏损八成的我是如何回本的》、《斩断亏损让利润奔跑》、《拒绝成为股市中的乌合之众》、《炒股就是赌运气,别用实力亏掉靠运气赚的钱》······ 看铁逵炒股直播的网友们表示,以上书名都是错的,本书应该又名:《可恶,又被他买到涨停股了》、《放开那个涨停板,让我上!》、《高喊要亏光的他又赚到了》、《他真把股市当取款机》、《我要拜他为师学炒股》、《买股票一定要跟紧他的步伐》······姜止戈穿越书中成为恶名滔天的反派魔帝,开局就被男主带着女主围攻陷入必死局面。 濒死之际,他觉醒了人生记忆编辑系统,向世人展现他的过往。 于是乎,一段段催人泪下的记忆显现在世人面前。 “柔儿,记住,宁为乞丐,不为人奴,只要我还在一天,便绝不会让你去为奴为婢。” “紫烟,为了你,成魔又有何妨,举世皆敌又有何妨?” ....... 待到一切浮出水面,世人才明白。 恶贯满盈的魔帝,所做一切只为所爱之人,只为庇佑世间安宁。讲述关于一个被捡来的孩子周游世界结识许多伙伴并成为世界最强的魔法士的故事急急急,修为高深的仙子要杀我,怎么破局?! “系统已切换成攻略版本,助宿主攻略成功。” 急急急,收不到天姿绝顶的弟子怎么破?! “系统已切换成最强师徒养成版本,为您保驾护航,助宿主登顶最强。” (都市+系统+搞笑+腹黑) 摩天轮上无数情侣正在恩爱。 张北哼着小曲,按下了红色的按钮。 身处于百米高空的摩天轮突然停住。 随后竟然横了过来。 无数坐在椅子上的情侣被弹射到了半空,仅有一个绳子连接。 几秒种后,整个摩天轮就像一个飞速旋转的盘子。 无数情侣在半空中玩起了温馨和谐的游戏。 跳楼机上,九十米高空的人体悠悠球。 碰碰车上,充满僵尸鬼怪的地下逃亡。 医生看着刚刚从过山车上下来的游客,将一颗速效救心丸塞进了壮汉的嘴中。 眼神中充满了幽怨。 “老板,这么下去会死人的!” “不会,你看他们多开心!”女侠何在? “女侠在此!”故事的背景貌似是全球生物的一次大逃亡,其实作者也不知道怎么老是梦见自己去拯救地球了呢,大概是作者有一个拯救世界的英雄梦,深切的希望世界和平吧。 女主这里给起了个名字:宋晓晓 其他角色:阿康武林盟主的儿子是个练武废柴 意外觉醒,竟然可以隐身了!!! 父亲被暗杀,从此走上了练武复仇的道路。 一个强盛的王朝,在烈焰中轰然倒塌。覆巢之下,人们挣扎在未尽的余灰中。许多人扛起了复国的渴望。可是,汹汹而来的鬼蜮伎俩,却将乱局搅动得愈加波诡云谲。好在,大智大勇者的神机妙算,最终冲破了鬼魅的阴霾。然而,一桩被掩藏了数十年的王朝秘事,却始终裹挟在迷雾之中,如今,它更是幻化成一张正缓缓地张开的血盆大口,誓要将这破碎的王朝一口吞下。
商城建设网站 四川信息安全培训 网站流程 网站建设设计 旅游网站设计 网络与信息安全系统工程师 专业网络营销整合服务 营销的 建设响应式网站有哪些好处 信息安全 行业新闻 电子政务信息安全 网络安全等保规定 信息安全高校 衡水如何做企业网站 网络安全文明网络 网络安全问题反馈平台 信息与网络安全防范技术 微网站案例 信息安全屏保图片 成都高端建设网站 网络营销人才供需状况 营销信 电子化营销 营销专业托队 商城建设网站 信息安全检查 衡水如何做企业网站 网络安全 决策树 郑州网站建设公司网络营销行为有哪些 禁忌网站 企业网络安全的现状分析 会员型网站 搜索引擎营销漏斗 用别人网络安全问题 九月有什么节日可营销 网站建设前期资料提供 四川信息安全培训 网站与与云的关系 网络安全文明网络 互联网信息安全事件,-1 信息安全研究机构排名 长沙手机网站建设信息安全 北京,-1 王秀军 网络安全与信息化 医院营销技巧 广州高档网站建设 惠普键盘信息安全隐患 徐文渊 网络安全 无锡网络营销外公司 自学营销 工业控制系统网络安全 网站大模板真流量 营销的 营销推广的含义 网站大模板真流量 北京网站建设公 企业网站的维护 郑州网站建设公司网络营销行为有哪些 外贸平台营销方案 网络安全工程 培训 外贸网络营销主要营销方式有哪些 旅游网站设计 营销专业托队 网络安全的正能量视频下载 搜索引擎整合营销方案 微网站案例 网络安全法 从业 更新网站的图片加不上水印 服务类网站免费建站 北邮网络安全研究中心 网站制作论坛 网络营销我为自己代言 网络营销模式 精品网站建设公司 信息安全高校 工控信息安全专题交流会 惠普键盘信息安全隐患 徐文渊 网络安全 无锡网络营销外公司 自学营销 工业控制系统网络安全