.clear universal clear float

html body div.clear,
html body span.clear
{
     background: none;
     border: 0;
     clear: both;
     display: block;
     float: none;
     font-size: 0;
     margin: 0;
     padding: 0;
     overflow: hidden;
     visibility: hidden;
     width: 0;
     height: 0;
}

 

There is a

.clearfix:after {
    content: "020";
    display: block;
    height: 0;
    clear: both;
}
.clearfix {
    zoom: 1;
}

This is to remove the optimized version of the floating style, very worthy of recommendation.

Method of use: by adding < in the page; div class= "clear" > </div> or <span class= "clear" > </span> to remove floating in the page.

Posted by Leo at November 18, 2013 - 6:54 AM