bootstrap

1Requires HTML5 doctype

<!DOCTYPE html>

<html lang="en">

...

</html>

2、The default Bootstrap grid system utilizes 12 columns.making for a 940px wide container without responsive features enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.

<div class="row">

<div class="span9">

Level 1 column

<div class="row">

<div class="span6">Level 2</div>

<div class="span3">Level 2</div>

</div>

</div>

</div>

Basic fluid grid HTML

The fluid grid system uses percents instead of pixels for column widths.

<div class="row-fluid">

<div class="span4">...</div>

<div class="span8">...</div>

</div>

Move columns to the right using .offset* classes. Each class increases the left margin of a column by a whole column.

Nesting columns

To nest your content with the default grid, add a new .row and set of .span* columns within an existing .span* column. Nested rows should include a set of columns that add up to the number of columns of its parent.

3、Layouts

Fixed layout

Provides a common fixed-width (and optionally responsive)  layout with only <div class="container"> required.

Fluid layout, use <div class="container-fluid">

4、Responsive design

Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <head> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">

5、base css

Body copy

Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default).

Make a paragraph stand out by adding .lead

Emphasis

<small></small>   <strong></strong>  <em><./em>( italicized text.)

Emphasis classes

<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>

<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>

<p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p>

<p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p>

<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>

http://twitter.github.com/bootstrap/base-css.html

转载于:https://my.oschina.net/xiejuntao/blog/81725

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值