text-decoration-skip-ink
**text-decoration-skip-ink
** CSS 属性指定当上划线和下划线经过字形升部和降部时如何绘制。
试一试
text-decoration-skip-ink
不是 text-decoration
简写的一部分。
语法
css
/* Single keyword */
text-decoration-skip-ink: none;
text-decoration-skip-ink: auto;
text-decoration-skip-ink: all;
/* Global keywords */
text-decoration-skip-ink: inherit;
text-decoration-skip-ink: initial;
text-decoration-skip-ink: revert;
text-decoration-skip-ink: revert-layer;
text-decoration-skip-ink: unset;
值
正式定义
正式语法
示例
HTML
html
<p>You should go on a quest for a cup of coffee.</p>
<p class="no-skip-ink">Or maybe you'd prefer some tea?</p>
<p>この文は、 text-decoration-skip-ink: auto の使用例を示しています。</p>
<p class="skip-ink-all">
この文は、 text-decoration-skip-ink: all の使用例を示しています。
</p>
CSS
css
p {
font-size: 1.5em;
text-decoration: underline blue;
text-decoration-skip-ink: auto; /* this is the default anyway */
}
.no-skip-ink {
text-decoration-skip-ink: none;
}
.skip-ink-all {
text-decoration-skip-ink: all;
}
结果
规范
规范 |
---|
CSS 文本装饰模块级别 4 # text-decoration-skip-ink-property |
浏览器兼容性
BCD 表格仅在浏览器中加载