text-stroke-width

CSS text-stroke-width Property

The text-stroke-width property specifies the width of the stroke.

The text-stroke property is only used with a -webkit- vendor prefix.

类目类目
Initial Value0
Applies toAll elements.
InheritedYes.
AnimatableNo
VersionCompatibility Standard
DOM Syntaxobject.style.textStrokeWidth = “thin”;

Syntax

Syntax

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

Example of the text-stroke-width property:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</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 property example</h2>
    <p class="thin">Lorem Ipsum </p>
    <p class="medium">Lorem Ipsum</p>
    <p class="thick">Lorem Ipsum</p>
  </body>
</html>

Result

Values

Values

ValueDescription
lengthSpecifies the thickness of the stroke.
initialMakes the property use its default value.
inheritInherits the property from its parents element.


请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部