Your location:Tech News>News>Script>Several methods to clear floating Detailed

Latest News

Several methods to clear floating Detailed

Author:fsadmin

Views:

  html

  

  

  

  

  css

  .box-left,.box-right {

  width: 200px;

  height: 200px;

  float: left;

  background: red;

  border: 1px solid # 333;

  }

  the first method:.box {clear: box}

  The second method:.box {overflow: hidden}

  The third method:.box {overflow: auto}

  The fourth method:.box: after {content: ""; height: 0; visibility: hidden; display: block; clear: both;}.box {zoom: 1;}

  The fifth method:.box {height: 200px} set the height

  Sixth method:.box {display: table}

  What methods are welcome to add, refueling and common progress

  That''s all for this article, I hope the contents of this paper we study or work can bring some help, but also hope a lot of support scripting House!

Recommend article

Relate article