text-decoration-skip-ink
        
        Baseline  广泛可用  *
        
        
          
                
              
                
              
                
              
        
        
      
      
    text-decoration-skip-ink CSS 属性指定了当上划线和下划线经过字形的升部和降部时,它们的绘制方式。
试一试
text-decoration-skip-ink: auto;
text-decoration-skip-ink: none;
<section id="default-example">
  <p>
    <span class="transition-all" id="example-element">parapsychologists</span>
  </p>
</section>
p {
  font:
    1.9em "Georgia",
    serif;
  text-decoration: underline;
}
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;
值
正式定义
正式语法
text-decoration-skip-ink =
auto |
none |
all
示例
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 | 
浏览器兼容性
加载中…
