CSS text-stroke-width 属性值说明

描述
length指定笔划的厚度。
initial使属性使用其默认值。
inherit从父母元素继承属性。

语法

text-stroke-width: length | initial | inheirt;

text-stroke-width 属性的示例:

<!DOCTYPE html>
<html>
  <head>
    <title>文档的标题</title>
    <style>
      p {
        margin: 0;
        font-size: 4em;
        -webkit-text-stroke-color: #1c87c9;
      }
      .thin {
        -webkit-text-stroke-width: thin;
      }
      .medium {
        -webkit-text-stroke-width: 3.5px;
      }
      .thick {
        -webkit-text-stroke-width: 1.3mm;
      }
    </style>
  </head>
  <body>
    <h2>Text-stroke-width 属性示例</h2>
    <p class="thin">Lorem Ipsum </p>
    <p class="medium">Lorem Ipsum</p>
    <p class="thick">Lorem Ipsum</p>
  </body>
</html>
CSS text-stroke-width 属性

text-stroke-width 属性指定笔画的宽度。

text-stroke 属性仅与 -webkit- 供应商前缀一起使用。

初始值0
应用于所有元素。
继承可继承
可动画的
版本兼容性标准
DOM 语法object.style.textstrokewidth =“thin”;
日期:2020-06-02 22:14:49 来源:oir作者:oir