text-decoration-skip 属性指定文本装饰应该跳过的元素内容部分。
它控制元素及其祖先绘制的所有文本装饰线。
“ink” 值已移至 text-decoration-skip-ink 属性。
| 初始值 | objects |
|---|---|
| 应用于 | 所有元素。 |
| 继承 | 可继承 |
| 可动画的 | 无效 |
| 版本 | CSS3. |
| DOM 语法 | object.style.textdecorationskip =“spaces”; |
CSS text-decoration-skip 属性值说明
| 值 | 描述 |
|---|---|
| none | 不会出现跳过。因此,为所有文本内容绘制文本装饰。 |
| objects | 如果是图像或者内联块,则跳过元素的整个边缘框。 |
| spaces | 所有间距都是跳过的。 |
| leading spaces | 跳过领先空间(印刷字符单元,Word分隔符,字母间距或者字距)。 |
| trailing spaces | 跳过 tail随空格(印刷字符单元,Word分隔符,字母间隔或者字距)。 |
| edges | 文本装饰的开始和结束略微来自装饰盒的内容边缘。 |
| box-decoration | 跳过盒子的保证金,边框和填充区域。 |
| ink | 跳过雕文或者下行字母。 |
| initial | 将属性设置为默认值。 |
| inherit | 从其父元素继承属性。 |
语法
text-decoration-skip: none | objects | spaces | leading spaces | trailing spaces | edges | box-decoration | initial | inherit;
text-decoration-skip 属性示例:
<!DOCTYPE html>
<html>
<head>
<title>文档的标题</title>
<style>
p {
margin: 1;
color: #ccc;
font-size: 2em;
text-decoration: underline;
text-decoration-skip: edges;
}
</style>
</head>
<body>
<h2>Text-decoration-style 属性示例</h2>
<p>
<em>Lorem,</em>
<em>ipsum is simply dummy text</em>
</p>
</body>
</html>
日期:2020-06-02 22:14:48 来源:oir作者:oir
