Chapter 1 unit 2 of Bootstrap-Bootstrap Scaffolding
来源:互联网 发布:优化教程 编辑:程序博客网 时间:2024/06/04 19:11
1.Fluid Grid System
the obvious difference is that ,the fluid grid system uses percentages instead of pixels for column widths.
It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices. You can make any row “fluid” by changing .row to .row-fluid. The column classes stay exactly the same, making it easy to flip between fixed and fluid grids. To offset, you operate in the same way as the fixed grid system—add .offset* to any column to shift by your desired number of columns:
<div class="row-fluid">
<div class="span4">...</div>
<div class="span8">...</div>
</div>
<div class="row-fluid">
<div class="span4">...</div>
<div class="span4 offset2">...</div>
</div>
Nesting a fluid grid is a little different.Since we are using percentages, each .row resets the column count to 12. For example, if you were inside a .span8, instead of
two .span4 elements to divide the content in half, you would use two .span6 divs .This is the case for responsive content, as we want the content to fill 100% of the container:
<div class="row-fluid">
<div class="span8">
<div class="row">
<div class="span6">...</div>
<div class="span6">...</div>
</div>
</div>
</div>
2.Container Layouts
To add a fixed-width, centered layout to your page, simply wrap the content in <div class="container">...</div>.If you would like to use a fluid layout but want to wrap
everything in a container, use the following: <div class="container-fluid">...</div>. Using a fluid layout is great when you are building applications, administration
screens, and other related projects.
3.Responsive Design
To turn on the responsive features of Bootstrap, you need to add a <meta> tag to the <head> of your web page. If you haven’t downloaded the compiled source, you will also
need to add the responsive CSS file. An example of required files looks like this:
<!DOCTYPE html>
<html>
<head>
<title>My amazing Bootstrap site!</title>
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/bootstrap-responsive.css" rel="stylesheet">
</head>
If you get started and find that the Bootstrap responsive features aren’tworking, make sure that you have these tags. The responsive features aren’t added by default at this time because not everything needs to be responsive. Instead of encouraging developers to remove this feature, the authors of Bootstrap decided that it was best to enable it as needed.
4.What Is Responsive Design?
Responsive design is a method for taking all of the existing content that is on the page and optimizing it for the device that is viewing it. For example, the desktop not only
gets the normal version of the website, but it might also get a widescreen layout, optimized for the larger displays that many people have attached to their computers. Tablets get an optimized layout, taking advantage of their portrait or landscape layouts. And then with phones, you can target their much narrower width. To target these different
widths, Bootstrap uses CSS media queries to measure the width of the browser viewport and then, using conditionals, changes which parts of the stylesheets are loaded. Using the width of the browser viewport, Bootstrap can then optimize the content using a combination of ratios or widths, but it mostly relies on min-width and max-width
properties. At the core, Bootstrap supports five different layouts, each relying on CSS media queries.The largest layout has columns that are 70 pixels wide, contrasting with the 60 pixels of the normal layout. The tablet layout brings the columns to 42 pixels wide, and when narrower than that, each column goes fluid, meaning the columns are stacked vertically and each column is the full width of the device.
- Chapter 1 unit 2 of Bootstrap-Bootstrap Scaffolding
- Chapter 1 unit 1 of Bootstrap-Bootstrap Scaffolding
- Chapter 2 unit 1 of Bootstrap-Bootstrap CSS
- Chapter 2 unit 2 of Bootstrap-Bootstrap CSS
- bootstrap之scaffolding&tables样式
- Bootstrap -1(认识Bootstrap)
- bootstrap中的page headers 和 hero unit
- bootstrap中的page headers 和 hero unit
- bootstrap中流布局hero-unit的设置
- Bootstrap
- BootStrap
- Bootstrap
- bootstrap
- Bootstrap
- bootstrap$
- Bootstrap
- Bootstrap
- Bootstrap
- 学习Android之第五个小程序新浪微博样式(Listview的使用)
- C语言 指向函数的指针
- -----------------INSTALL_FAILED_INSUFFICIENT_STORAGE 异常的解决方法
- Codeforces Round #239 (Div. 2) A~D
- hadoop 0.20.2 多文件输出
- Chapter 1 unit 2 of Bootstrap-Bootstrap Scaffolding
- POJ推荐题 POJ题 POJ入门
- [动态规划]UVA 507 - Jill Rides Again
- C++ 分割字符串
- 第6周作业-图像缩放显示(改)
- Linux学习之Makefile和Configure文件说明
- (2014编程之美资格赛)题目2 : 大神与三位小伙伴
- 程序员面试宝典_第13章_数据结构基础_排序算法小结(2)
- Linux环境下搭建Qt5.1.0 Beta的Android开发环境