这个clear
属性控制浮动元素旁边的流程。
这个clear
属性指定浮动元素旁边的元素应该发生什么。
提示:另请参阅 float
属性。
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
clear | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
clear: none|left|right|both|initial|inherit;
Value | Description | Demo |
---|---|---|
none | Default. The element is not pushed below left or right floated elements | Demo ❯ |
left | The element is pushed below left floated elements | Demo ❯ |
right | The element is pushed below right floated elements | Demo ❯ |
both | The element is pushed below both left and right floated elements | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
CSS教程:CSS 浮动
HTML DOM 参考:清晰的属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!