標籤:style blog http io color os ar 使用 sp
1.rule
#html
<!DOCTYPE html>
<html>
<head> <link rel="stylesheet" href="main.css"></head><body> <div class="header"> <p> </div>
</body>
</html>
css
h1{字型: color:red; //rgb(123,21,2) #00ccff font-family: Arial, Helvetica, sans-serif; font-size:50px;位置 display:block; //ul, li, p, h1 :inline; //a, img position:fixed; //top:10px; left:30px; :relative; //相對父容器top: left: float:left; //浮動 clear:both; //關閉浮動==== margin:22px; border: 3px solid #cc0000; padding: 23px; -top right bottom left margin:auto //置中 margin-right:auto //居左 margin-left: auto; //靠右 背景 background-color:#0099cc background-image: url(‘http://goo.gl/ODpi3y‘);}
2bootstrap架構
2.1.grid柵格系統(12=6+6=4+4+4=4+8=2+8+2)
<head>
<!--引用-->
<link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css" rel="stylesheet">
</head>
<div class="row"> <div class="col-md-2"> <h4>Content 1</h4> </div> <div class="col-md-8"> <h4>Content 2</h4> </div> <div class="col-md-2"> <h4>Content 3</h4> </div></div>
2.2.tab標籤(類似gmail)
<ul class="nav nav-tabs "> <li><a href="#">Primary</a></li> <li class="active"><a href="#">Social</a></li> <li><a href="#">Promotions</a></li> <li><a href="#">Updates</a></li></ul>
2.3Pills(展示網站不同部分,類似Google搜尋結果頁)
<ul class="nav nav-pills"> <li><a href="#">Primary</a></li> <li class="active"><a href="#">Social</a></li> <li><a href="#">Promotions</a></li> <li><a href="#">Updates</a></li></ul>
2.4.jumbotron(展示大案例showcase,類似Google Mobile)
<div class="jumbotron"> <h1>Find a place to stay.</h1> <p>Rent from people in over 34,000 cities and 192 countries.</p></div>
3.Sum總結mary
在掌握了css的基本使用後,通過使用像bootstrap這種架構就可以很快的搭建好網站的基本樣式架構,從而設計多好看的頁面,bootstrap提供了很多的組件,可以自由搭配定製
Web-css-bootstrap