前端知識複習一(css)

來源:互聯網
上載者:User

標籤:

1.清楚浮動

  父盒子高度為0,子盒子全部定位、浮動。子盒子不會撐開父盒子,下面的盒子會頂上來

  清楚方法:

    clear:both;

    overflow:hidden;

    加空標籤

    單/雙

//雙標籤.clearfix:berore , .clearfix:after {      content:".";      didsplay:table;}    .fixclear:after{      clear:both;  }.fixclear{      *zoom:1;  }
//單標籤.fixclear:after{    content:"0";    display:block;    height:0;    ling-height:0;    visibility:hidden;    clear:both;}    .fixclear{    *zoom:1;//相容IE     }

2.隱藏盒子的物種方法

  1.display:none;  隱藏盒子,不佔位置

  2.overflow:hidden;  隱藏溢出部分

  3.visibility:hidden:  隱藏盒子,佔位置

  4.opacity:0;  隱藏盒子,佔位置(設定透明之後,裡麵包含的內容也透明)

  5.position-left/top:-999em;  隱藏盒子,不佔位置

3.有高度的盒子,子盒子高度超過父盒子高度,父盒子會被撐破;

4.沒有高度的盒子,子盒子會撐開父盒子

5.浮動的盒子遮擋不住標準流的文字

6.cursor:pointer;類比滑鼠小手

7.dotted  點線  dashed  虛線

8.層級

  浮動的比標準的高。定位的比浮動的高

  z-index為負值的比標準流的盒子層級低

    

 

      

前端知識複習一(css)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.