text-decoration-skip-ink 属性指定下划线和上划线在跨越字形时如何绘制。
当 text-decoration-line 属性设置为“underline”和“overline”时,text-decoration-skip-ink 属性会起作用。
“线路通过”值不受影响。
| 初始值 | auto |
|---|---|
| 应用于 | 所有元素。 |
| 继承 | 可继承 |
| 可动画的 | 无效 |
| 版本 | CSS文本装饰模块等级4 |
| DOM 语法 | object.style.textdecorationskipink =“none”; |
语法
text-decoration-skip-ink: auto | none | initial | inherit;
text-decoration-skip-ink 属性示例:
<!DOCTYPE html>
<html>
<head>
<title>文档的标题</title>
<style>
.ex1 {
margin: 0;
font-size: 2em;
text-decoration: underline #1c87c9;
text-decoration-skip-ink: none;
}
.ex2 {
margin: 0;
font-size: 2em;
text-decoration: underline #1c87c9;
text-decoration-skip-ink: auto;
}
</style>
</head>
<body>
<h2>
Text-decoration-skip-ink 属性示例
</h2>
<h3>
Text-decoration-skip-ink: none;
</h3>
<p class="ex1">
生活终归还得继续。
</p>
<h3>
Text-decoration-skip-ink:auto;
</h3>
<p class="ex2">
生活终归还得继续。
</p>
</body>
</html>
CSS text-decoration-skip-ink 属性值说明
| 值 | 描述 |
|---|---|
| auto | 强调和重叠仅绘制他们不触摸或者密切接近字形的地方。这是此属性的默认值。 |
| none | 为所有文本内容绘制强调和重叠,包括交叉字体解除仪和升级的部分。 |
| initial | 将属性设置为默认值。 |
| inherit | 从其父元素继承属性。 |
日期:2020-06-02 22:14:48 来源:oir作者:oir
