aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/text-decoration-line
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/css/text-decoration-line')
-rw-r--r--files/zh-cn/web/css/text-decoration-line/index.html109
1 files changed, 109 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/text-decoration-line/index.html b/files/zh-cn/web/css/text-decoration-line/index.html
new file mode 100644
index 0000000000..7b8e74abf6
--- /dev/null
+++ b/files/zh-cn/web/css/text-decoration-line/index.html
@@ -0,0 +1,109 @@
+---
+title: text-decoration-line
+slug: Web/CSS/text-decoration-line
+tags:
+ - CSS
+ - CSS 属性
+ - CSS 文本修饰
+ - 参考
+translation_of: Web/CSS/text-decoration-line
+---
+<div>{{CSSRef}}</div>
+
+<p><a href="/en-US/docs/CSS">CSS</a> 属性 <strong><code>text-decoration-line</code></strong> 用于设置元素中的文本的修饰类型。当要设置多个线修饰属性时,用 {{cssxref("text-decoration")}} 简写属性会比分别写多个属性更方便。</p>
+
+<pre class="brush:css no-line-numbers">/* Keyword values */
+text-decoration-line: none;
+text-decoration-line: underline;
+text-decoration-line: overline;
+text-decoration-line: line-through;
+text-decoration-line: blink;
+text-decoration-line: underline overline; /* Two decoration lines */
+text-decoration-line: overline underline line-through; /* Multiple decoration lines */
+
+/* Global values */
+text-decoration-line: inherit;
+text-decoration-line: initial;
+text-decoration-line: unset;
+</pre>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<h3 id="值">值</h3>
+
+<p><code>text-decoration-line</code> 属性可以设置为 <code>none</code>, 或者<strong>一个及多个</strong>用空格分隔的下列值。</p>
+
+<dl>
+ <dt><code>none</code></dt>
+ <dd>表示没有文本修饰效果。</dd>
+ <dt><code>underline</code></dt>
+ <dd>在文本的下方有一条修饰线。</dd>
+ <dt><code>overline</code></dt>
+ <dd>在文本的上方有一条修饰线。</dd>
+ <dt><code>line-through</code></dt>
+ <dd>有一条贯穿文本中间的修饰线。</dd>
+ <dt><code>blink {{deprecated_inline}}</code></dt>
+ <dd>文本闪烁(文本交替处于显示与隐藏状态)。客户代理都一致没有实现文本闪烁效果。考虑到为了支持使用 <a href="/en-US/docs/Web/CSS/animation">CSS 动画</a>,该值也<strong>不宜使用</strong>。</dd>
+</dl>
+
+<h3 id="格式化语法">格式化语法</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="示例">示例</h2>
+
+<div id="Examples">
+<pre class="brush: html">&lt;p class="wavy"&gt;Here's some text with wavy red underline!&lt;/p&gt;
+&lt;p class="both"&gt;This text has lines both above and below it.&lt;/p&gt;</pre>
+
+<pre class="brush: css">.wavy {
+ text-decoration-line: underline;
+ text-decoration-style: wavy;
+ text-decoration-color: red;
+}
+
+.both {
+ text-decoration-line: underline overline;
+}</pre>
+
+<p>{{ EmbedLiveSample('Examples', '', '', '') }}</p>
+</div>
+
+<h2 id="规范">规范</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 Text Decoration', '#text-decoration-line', 'text-decoration-line')}}</td>
+ <td>{{Spec2('CSS3 Text Decoration')}}</td>
+ <td>
+ <p>初次定义。{{cssxref("text-decoration")}} 属性同时变成了定义多个相关属性的简写形式。</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p> </p>
+
+
+
+<p>{{Compat("css.properties.text-decoration-line")}}</p>
+
+<p> </p>
+
+<h2 id="另请参阅">另请参阅</h2>
+
+<ul>
+ <li>当要设置多个线修饰属性时,用 {{cssxref("text-decoration")}} 简写属性会比分别写多个属性更方便。</li>
+</ul>