返回顶部

收藏

Clear floats without structural markup

更多

".clearfix" is the container that holds all of your floated elements. Works in all browsers that support "float" and "clear".

[CSS]代码

.clearfix
{
    display: inline-table;
/* Hides from IE-mac \*/
    height: 1%;
    display: block;
/* End hide from IE-mac */
}

html>body .clearfix
{
    height: auto;
}

.clearfix:after
{
    content: "."; 
    display: block; 
    height: 0; 
    clear: both; 
    visibility: hidden;
}

标签:html,css

收藏

0人收藏

支持

0

反对

0