From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/overflow-x/index.html | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 files/zh-cn/web/css/overflow-x/index.html (limited to 'files/zh-cn/web/css/overflow-x') diff --git a/files/zh-cn/web/css/overflow-x/index.html b/files/zh-cn/web/css/overflow-x/index.html new file mode 100644 index 0000000000..cae7d4fe1f --- /dev/null +++ b/files/zh-cn/web/css/overflow-x/index.html @@ -0,0 +1,74 @@ +--- +title: overflow-x +slug: Web/CSS/overflow-x +translation_of: Web/CSS/overflow-x +--- +

{{ CSSRef() }}

+ +

{{ SeeCompatTable() }}

+ +

概述

+ +

当一个块级元素的内容在水平方向发生溢出时,CSS属性overflow-x决定应该截断溢出内容,或者显示滚动条,或者直接显示溢出内容

+ +

{{cssinfo}}

+ +

用法

+ +
合法值: {{csssyntax("overflow-x")}}
+
+ +
overflow-x: visible
+overflow-x: hidden
+overflow-x: scroll
+overflow-x: auto
+
+overflow-x: inherit
+
+ +

解释

+ +
+
visible
+
内容不会被截断,且可以显示在内容盒之外。
+
hidden
+
内容会被截断,且不会显示滚动条。
+
scroll
+
桌面浏览器总是显示滚动条,无论内容是否发生溢出。这可以避免滚动条的显示与消失所导致的元素尺寸不确定的问题。而打印机可能会打印溢出的内容。
+
auto
+
取决于浏览器本身。当内容发生溢出时,桌面浏览器如Firefox会显示滚动条。
+
+ +

示例

+ +
[fixme]
+
+ +

规范

+ + + + + + + + + + + + + + + + +
规范状态备注  
{{ SpecName('CSS3 Box', '#overflow-x', 'overflow-x') }}{{ Spec2('CSS3 Box') }}
+ +

浏览器支持

+ +

{{Compat("css.properties.overflow-x")}}

+ +

参见

+ + -- cgit v1.2.3-54-g00ecf