Overflow 属性设置或返回如何处理在元素框之外呈现的内容。
提示:如果要隐藏整个文档的滚动条,请使用 body 或 html 元素上的 Overflow 属性。
Property | |||||
---|---|---|---|---|---|
overflow | Yes | Yes | Yes | Yes | Yes |
返回溢出属性:
object.style.overflow
设置溢出属性:
object.style.overflow = "visible|hidden|scroll|auto|initial|inherit"
Value | Description |
---|---|
visible | Content is NOT clipped and may be shown outside the element box. This is default |
hidden | Content outside the element box is not shown |
scroll | Scroll bars are added, and content is clipped when necessary |
auto | Content is clipped and scroll bars are added when necessary |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
默认值: | 可见的 |
---|---|
返回值: | 一个字符串,表示在元素框之外呈现的内容 |
CSS版本 | CSS2 |
CSS教程:CSS 溢出
CSS教程:CSS定位
CSS 参考:溢出属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!