CSS text-decoration-skip 属性

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