diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/overflow-x/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/css/overflow-x/index.html')
-rw-r--r-- | files/zh-cn/web/css/overflow-x/index.html | 74 |
1 files changed, 74 insertions, 0 deletions
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 +--- +<p>{{ CSSRef() }}</p> + +<p>{{ SeeCompatTable() }}</p> + +<h2 id="Summary" name="Summary">概述</h2> + +<p><span style="line-height: inherit;">当一个块级元素的内容在水平方向发生溢出时,</span><a href="/en/CSS" style="line-height: inherit;" title="CSS">CSS</a><span style="line-height: inherit;">属性</span><span style="font-family: courier new,andale mono,monospace; line-height: inherit;">overflow-x</span><span style="line-height: inherit;">决定应该截断溢出内容,或者显示滚动条,或者直接显示溢出内容</span><span style="line-height: inherit;">。</span></p> + +<p>{{cssinfo}}</p> + +<h2 id="Syntax" name="Syntax">用法</h2> + +<pre class="twopartsyntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">合法值</a>: {{csssyntax("overflow-x")}} +</pre> + +<pre>overflow-x: visible +overflow-x: hidden +overflow-x: scroll +overflow-x: auto + +overflow-x: inherit +</pre> + +<h3 id="Values" name="Values">解释</h3> + +<dl> + <dt><code>visible</code></dt> + <dd>内容不会被截断,且可以显示在内容盒之外。</dd> + <dt><code>hidden</code></dt> + <dd>内容会被截断,且不会显示滚动条。</dd> + <dt><code>scroll</code></dt> + <dd>桌面浏览器总是显示滚动条,无论内容是否发生溢出。这可以避免滚动条的显示与消失所导致的元素尺寸不确定的问题。而打印机可能会打印溢出的内容。</dd> + <dt><code>auto</code></dt> + <dd>取决于浏览器本身。当内容发生溢出时,桌面浏览器如Firefox会显示滚动条。</dd> +</dl> + +<h2 id="Examples" name="Examples">示例</h2> + +<pre class="eval">[fixme] +</pre> + +<h2 id="Specifications" name="Specifications">规范</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">规范</th> + <th scope="col">状态</th> + <th scope="col">备注 </th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('CSS3 Box', '#overflow-x', 'overflow-x') }}</td> + <td>{{ Spec2('CSS3 Box') }}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器支持</h2> + +<p>{{Compat("css.properties.overflow-x")}}</p> + +<h2 id="See_also" name="See_also">参见</h2> + +<ul> + <li>相关CSS属性: {{ cssxref("text-overflow") }}, {{ cssxref("white-space") }}, {{ Cssxref("overflow") }}, {{ Cssxref("overflow-y") }}, {{ Cssxref("clip") }}, {{ Cssxref("display") }}</li> +</ul> |