我碰巧看到了div哪种风格clear:both!什么是使用clear的style?
<div style="clear:both">
Run Code Online (Sandbox Code Playgroud)
Ric*_*dle 245
clear:both 使元素下降到文档中前面的任何浮动元素下面.
您也可以使用clear:left或clear:right使其仅落在左侧或右侧浮动的元素下方.
+------------+ +--------------------+
| | | |
| float:left | | without clear |
| | | |
| | +--------------------+
| | +--------------------+
| | | |
| | | with clear:right |
| | | (no effect here, |
| | | as there is no |
| | | float:right |
| | | element) |
| | | |
| | +--------------------+
| |
+------------+
+---------------------+
| |
| with clear:left |
| or clear:both |
| |
+---------------------+
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
103632 次 |
| 最近记录: |