Propiedad CSS text-stroke-width
La propiedad -webkit-text-stroke-width especifica el ancho del trazo del texto.
INFO
La propiedad text-stroke-width no está estandarizada como propiedad independiente. La abreviatura estándar es text-stroke (CSS Text Level 4). Para un amplio soporte en navegadores, utiliza el prefijo de proveedor -webkit-.
| Valor inicial | 0 |
|---|---|
| Se aplica a | Todos los elementos. |
| Heredado | No. |
| Animable | No |
| Versión | CSS Text Level 4 (con prefijo de proveedor) |
| Sintaxis DOM | object.style.webkitTextStrokeWidth = "1px"; |
Sintaxis
Valores de CSS text-stroke-width
css
-webkit-text-stroke-width: length | initial | inherit;Ejemplo de la propiedad text-stroke-width:
Ejemplo de código CSS text-stroke-width
html
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
p, h2 {
margin: 0;
font-size: 4em;
-webkit-text-stroke-color: #1c87c9;
}
.thin {
-webkit-text-stroke-width: 1px;
}
.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>Resultado

Nota: Donde sea compatible, utiliza la abreviatura estándar text-stroke en lugar de la propiedad con prefijo.
Valores
| Valor | Descripción |
|---|---|
| length | Especifica el grosor del trazo. |
| initial | Hace que la propiedad utilice su valor predeterminado. |
| inherit | Hereda la propiedad de su elemento padre. |
Práctica
¿Cuál de las siguientes afirmaciones es incorrecta sobre la propiedad CSS text-stroke-width?