clear: Both
" Clear floating "clear is often used in CSS. The typical method is clear: Both;
This is the description in the CSS manual: the value of this attribute indicates that the edge of a floating object is not allowed. This attribute is used to control the physical location of the float attribute in the Document Stream.
when the attribute is set to float, its physical location is already out of the Document Stream, but most of the time we want the Document Stream to recognize float or float The elements after (floating) are not affected by float, so we need to clear them with clear: Both.
for example:
This is the 1st column,
This is the 2nd column,
This is the 3rd column.
If float is not cleared, then the 3rd columns of text will be associated with the 1st and 2 columns of text, so we add a clear floating clear: both in the 3rd columns;
This is the 1st column,
This is the 2nd column,
This is the 3rd column.
generally, we often define a CSS style separately, such as
. clear {
clear: both;
}
then use
to specifically" Clear floating ".
original:
http://blog.sina.com.cn/s/blog_7f854a010100re65.html
example
. clear10 {clear: Both; Height: 10px; overflow: hidden ;}
. yao {float: Left; width: 100px ;}
Hello everyone
I am also very good
Hello everyone
Original article:
Http://zhidao.baidu.com/question/157056984.html