Propiedad text-stroke-width

La propiedad text-stroke-width establece el grosor del contorno de los caracteres de texto o su trazo. La propiedad acepta valores especificados en unidades de tamaño como px, em, rem, etc. También se pueden establecer los siguientes valores: thin (línea fina), medium (línea media) y thick (línea gruesa).

Sintaxis

cssselector {
  text-stroke-width: número o thin o medium o thick;
}

Ejemplo

Vamos a establecer un trazo fino para los caracteres de nuestro texto:

html<p>
  Text
</p>
cssbody {
  width: 100px;
  height: 50px;
}
p {
  -webkit-text-stroke-color: orange;
  -webkit-text-stroke-width: thin;
  text-stroke-width: thin;
  color: white;
  font-size: 10em;
  margin-top: 0;
  font-weight: bold;
  font-family: Arial;
}

Результат:

Ejemplo

Y ahora cambiemos el trazo fino a medio:

html<p>
  Text
</p>
cssbody {
  width: 100px;
  height: 50px;
}
p {
  -webkit-text-stroke-color: orange;
  -webkit-text-stroke-width: medium;
  text-stroke-width: medium;
  color: white;
  font-size: 10em;
  margin-top: 0;
  font-weight: bold;
  font-family: Arial;
}

Результат:

Ejemplo

Vamos a establecer un trazo grueso para los caracteres de nuestro texto:

html<p>
  Text
</p>
cssbody {
  width: 100px;
  height: 50px;
}
p {
  -webkit-text-stroke-color: orange;
  -webkit-text-stroke-width: thick;
  text-stroke-width: thick;
  color: white;
  font-size: 10em;
  margin-top: 0;
  font-weight: bold;
  font-family: Arial;
}

Результат:

Ejemplo

También vamos a establecer un trazo de 2px para los caracteres de nuestro texto:

html<p>
  Text
</p>
cssbody {
  width: 100px;
  height: 50px;
}
p {
  -webkit-text-stroke-color: orange;
  -webkit-text-stroke-width: 2px;
  color: white;
  font-size: 10em;
  margin-top: 0;
  font-weight: bold;
  font-family: Arial;
}

Результат:

Véase también