cssclearproperty
Translation results:
clear
UK[klɪə(r)] US[klɪr]
adj. Clear; clear; clear, clear; clear, bright
adv.completely; clearly; whole
vi.become clear; become clear
vt.sweep, remove; eliminate (suspect); make clear; make clean
n.gap, space
cssclearpropertysyntax
Function:The clear attribute specifies which side of the element does not allow other floating elements.
Description: clear attribute defines which side of the element is not allowed to have floating elements. In CSS1 and CSS2, this was accomplished by automatically adding a top margin to clear elements (i.e., elements with the clear property set). In CSS2.1, clear space is added above the element's upper margin, but the margin itself does not change. Regardless of the change, the end result is the same. If it is declared as left or right clear, the upper border of the element will be just below the lower margin of the floating element on that side.
Note: All major browsers support the clear attribute. The attribute value "inherit" is not supported in any version of Internet Explorer, including IE8.
cssclearpropertyexample
<html> <head> <style type="text/css"> img { float:left; clear:both; } </style> </head> <body> <img src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" /> <img src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" /> </body> </html>
Click the "Run instance" button to view the online instance