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
重庆网站建设公司哪个网站是专门为建设方服务的网络安全服务费信息安全等级保护指南太原理工信息安全怎么免费把自己在dreamweaver做的网站放到网上去优秀网站案列政府网站 欣赏单位信息安全等级保护工作部署美国 专家 信息安全李二狗出生在普通的农村乡下,父母比较喜欢自己的弟弟,对二狗不闻不问,做错点事情也是非打即骂。一般的农村孩子都是初中毕业甚至好多初中没毕业就出去打工了,二狗不想像他们一样,发奋读书争取早日离开老家和不爱自己的父母,去大城市干一番事业,此间经历了各种酸甜苦辣…………………………………农小乐见义勇为,却被人打成瞎子;因祸得福获得古医针道传承。一场误会,让农小乐陷入红粉佳人的圈子。老话说戏子无情,可是接下来农小乐所遇到的“戏子”,却是与众不同。人生无常,本应平凡一生,却因针道传承,发现自己的身世之谜。本应平平淡淡,却因针道传承得知古医术分歧;为保住古医,不惜只身对抗一切邪恶力量……低武境界:人武→地灵→天象→先天宗师(初窥:意思是刚踏入) 中武境界:先天宗师(大成)→人元玄灵境→地元道神境→天元极仙境(初窥) 高武境界:天元极仙境(大成)→归墟境→墟弥境 修真及修仙进阶:金丹→元婴→三花聚顶→仙人 作品的大概论述:夜君宸先是练心→开启大争之世→推动中元统一之路→推动九境归一,还原洪荒世界原貌→高武修仙时代的到来→天下武林为祭品,开启末武时代→末武时代结束,王朝更替,练武末路。(总结概况:盛极而衰)他,穿越到大明皇宫,成为大明已故太子朱标的嫡次子朱允熥。 大明皇孙,本是身份尊贵的存在,但偏偏老父亲已故,本也不受祖父待见,册封皇太孙朱允炆的日子也即将来临。 既然眼前局势来不及改变,为了活,他也只能先夹着尾巴做人。 但是,熟知历史的他,知道原主的下场凄惨! 为了改变,他暗中运筹帷幄,就藩之日便是他称王之时!古闻天地末判其名,混沌、乾坤未分,是名胚晖。远古混沌大陆,生活着至高神王,在一次意外事件中,不幸陨落。大陆崩碎,人心涣散,世界混乱。生活在一个小村庄的少年,面对突如其来的变故,看他如何面对人生困境,在低谷时奋力挣扎。命运不公,那就打破命运;苍天不公,那就踏破苍天。。。。。。御兽时代,全民契约。 异界生灵将在100天后入侵蓝星。 前世,林秋因为防御太弱,没有熬过那百日之后的灾难。 重生的林秋,觉醒了神级御兽师天赋【大自在】,拥有了为其御兽自由加点的恐怖能力。 出于谨慎,他将自由属性点全点防御力。 一个远超想象的史诗时代出现在他面前……重生战国末年,白仲成为秦国攻打赵国战场上的一个新兵。 正值嬴政横扫六合,统一天下之时,战乱频起。 白仲获得战神系统,杀敌就能变强,杀敌就能立功封爵,走上人生巅峰。 依靠秦国的军功爵位制度,白仲从一个新兵,通过不断杀敌,立下无数军功,成为大秦百万锐士的统帅,兵锋所过,六国俯首。 王翦:白将军一人,可抵千军万马。 蒙恬:白将军却匈奴七百余里,胡人不敢南下而牧马。 王绾:白将军,血手人屠,嗜杀如狂,每战必血流成河,尸横遍野,有伤天和。 六国贵族:秦有白仲,我等复国无望! 嬴政:白仲,寡人之武安君白起。 白仲:我比白起还要凶残!一辰,你们家的床大不大呀,介不介意小女子们在此借宿一宿呢 你穿上衣服的样子真好看呢,你也是不穿更好看! 美女事业两不误,他全都,要要要!!!宇宙就是一座黑暗森林,每个维度的文明都是带枪的猎人,在这片森林中,他人就是地狱,就是永恒的威胁,任何暴露自己存在的生命都将很快被消灭。——刘慈欣。 元宇宙历188年,人类主动打开元宇宙世界,将自己暴露在诸天宇宙所有万维生物的眼前,开启了漫长而又血腥的进化之战。 “与其等着被其他维度狩猎,不如主动出击,要么轰轰烈烈实现进化,要么全族战死万维战场。” “人类,要的从来不是生存,而是进化!” 看着满天由二维生物、四维生物、六维生物……组成的万维大军,人族第一战神叶天横刀向前,所向披靡。这是我的第一本书 讲述的是虚降计划后第一批重建的文明完成复兴前那一段时期的故事。至于虚降计划...其实我也不清楚是个啥。
安全的网站制作公司 263网站建设怎么样 互联网信息安全要求,-1 免飞网站 如何网络安全建设 小米公司网络营销分析 网络安全攻防大赛 网站使用的主色调 网络安全相关事件 河池网站建设 上海网站优化 总参信息安全 厦门网络推广建网站 电商的内容营销案例 河池网站建设 安全的网站制作公司 深圳专业网站制作多少钱 安徽网站推广 常州网站制作 网络营销代运营 常用网络安全技术有哪些 网络安全相关事件 线框图网站 分析我国网络营销现状 时效性营销 深圳 信息安全培训班 信息网络安全技术培训 网络安全对抗数据赛 厦门网络推广建网站 电商的内容营销案例 河池网站建设 安全的网站制作公司 深圳专业网站制作多少钱 安徽网站推广 常州网站制作 网络营销代运营 常用网络安全技术有哪些 网络安全相关事件 线框图网站 分析我国网络营销现状 互联网信息安全产业基地 网络安全攻防大赛 2015网络安全周 高端网站案例 网络安全法制定本行业 中国信息安全十大公司 时效性营销 网络营销网站银川建立网站 信息安全风险管理 优秀网站案列 如何报考网络营销师 电商的内容营销案例 开放网络安全吗 1对1营销案例 怎么免费把自己在dreamweaver做的网站放到网上去 网络安全对抗数据赛 陌陌做营销 身边的信息安全 比较营销 信息安全等级保护标准体系遵循以下原则 全面性 系统性 先进性 3. 计算机网络安全是 网站控制 免飞网站 网络信息安全交流会 南昌网站建设公司资讯 网站欣赏 计算机网络信息安全证 信息安全服务资质 南昌网站建设 陌陌做营销 四川建网站初级信息安全测评师 网络营销必然性 昆明网站建设排名 it网络安全培训课程 2015网络安全周 湛江有帮公司做网站 国家信息安全等级第一级保护制度,-1 网络营销出来做什么的 至设计网站 高端网站案例 网络营销公司多少 小米事件营销 网站方案书 北京wap网站开发 关注信息安全 网站使用的主色调 广东汽车品牌网站建设 企业信息安全 小米公司网络营销分析 学校网站的作用 预售营销计划英文 龙华民治网站设计公司 网络安全培训前景 wifi信息安全登记平台 263网站建设怎么样 民营医疗营销 互联网信息安全产业基地 开放网络安全吗 网络营销渠道 恩施做网站 万户网络网站顾问 小米公司网络营销分析 营销培训课程体系 内蒙古网站设计 信息安全防范技术水平 中国国家信息安全漏洞库支撑单位 总参信息安全 贵州网站优化网络安全 依据 网站建设开发公司 网站方案书 中国国家信息安全漏洞库支撑单位 网络安全竟赛 网站控制 租车网站建设 网络安全竟赛 1号店营销 重庆 网络营销 推广 信息安全控制基础原则 网络安全常用工具 国家信息安全等级第一级保护制度,-1 企业网站制作公司 公安部公共信息网络安全监察局 信息安全等级保护培训ppt 广东地方网络安全法规 虚拟营销 北航 信息安全 导师 信息安全风险管理 常用网络安全技术有哪些 政府网站 欣赏 网络营销与政治 关注信息安全 北京专业网站建设 饭客网络安全论坛 信息网络安全技术培训 企业网站制作公司 安徽网站推广 2016国内信息安全事件 网站类型 网站名称 表现主题 内容设计 色彩搭配 服务对象 河池网站建设 网络营销做什么 深圳专业网站制作多少钱 网络安全对抗数据赛 网络安全考试网址 河池网站建设 信息安全等级保护指南 龙华民治网站设计公司