Web-css-bootstrap

來源:互聯網
上載者:User

標籤: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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.