Verflow:hidden This CSS style is commonly used in CSS style, but most people's understanding of this style is only limited to hidden overflow, and the meaning of clear floating is not very understanding. When it comes to clearing floats, we'll think of another CSS style: Clear:both, I'm sure there's no problem with the understanding of this property.
Verflow:hidden clears the float as follows: (Style the box div is the parent element of the style content div)
. box{
Background: #000;
width:300px;
Overflow:hidden;
}
. Content {
Float:left;
width:200px;
height:200px;
background:red;
}
box sets the Overflow:hidden to clear the float of content, so the height of the box changes depending on the content height. If box is not set Overflow:hidden, then the high content will not affect the height of box.
Detailed Address: http://jingyan.baidu.com/article/d45ad148e2a7f969552b80ae.html?qq-pf-to=pcqq.c2c
CSS Overflow:hidden (Clear float)