--- title: text-decoration-skip slug: Web/CSS/text-decoration-skip translation_of: Web/CSS/text-decoration-skip ---
CSS text-decoration-skip
属性定义了元素哪些部分的内容需要被文本修饰所跳过。它可以控制所有该元素或该元素的祖先所绘制的文本修饰线。
/* 关键字 */ text-decoration-skip: none; text-decoration-skip: objects; text-decoration-skip: spaces; text-decoration-skip: edges; text-decoration-skip: box-decoration; /* 使用多个关键字 */ text-decoration-skip: objects spaces; text-decoration-skip: leading-spaces trailing-spaces; text-decoration-skip: objects edges box-decoration; /* 全局值 */ text-decoration-skip: inherit; text-decoration-skip: initial; text-decoration-skip: unset;
注意: ink
值被移动至 {{cssxref("text-decoration-skip-ink")}} 属性。
{{cssinfo}}
none
objects
spaces
leading-spaces
spaces
相同。trailing-spaces
spaces
相同。edges
box-decoration
<p><em>Hey,</em> <em>grab a cup of coffee!</em></p>
p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; }
{{EmbedLiveSample("Example", "100%", 60)}}
Specification | Status | Comment |
---|---|---|
{{SpecName("CSS4 Text Decoration", "#text-decoration-skip-property", "text-decoration-skip")}} | {{Spec2("CSS4 Text Decoration")}} | 首次定义 |
{{Compat("css.properties.text-decoration-skip")}}