-webkit-text-stroke

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2017.

No estándar: Esta función no está estandarizada. No recomendamos usar funciones no estándar en producción, ya que tienen un soporte limitado en los navegadores y pueden cambiar o eliminarse. Sin embargo, pueden ser una alternativa adecuada en casos específicos donde no exista una opción estándar.

Resumen

La propiedad CSS -webkit-text-stroke especifica la anchura y color del trazo para los caractéres de texto. Esta forma es una manera corta en relación con la forma larga que necesita usar las propiedades-webkit-text-stroke-width y -webkit-text-stroke-color.

Valor inicialas each of the properties of the shorthand:
Applies toall elements
Heredableyes
Valor calculadoas each of the properties of the shorthand:
Animation typeas each of the properties of the shorthand:

Síntaxis

css
/* Valores anchura y color */
-webkit-text-stroke: 4px navy;

/* Valores globales */
-webkit-text-stroke: inherit;
-webkit-text-stroke: initial;
-webkit-text-stroke: unset;

Valores

La anchura del trazo.

El color del trazo.

Síntaxis Formal

-webkit-text-stroke = 
||


=
|
thin |
medium |
thick

Ejemplo

HTML

html

El trazo de este texto es rojo.

CSS

css
#example {
  font-size: 50px;
  margin: 0;
  -webkit-text-stroke: 2px red;
}

Especificaciones

Specification
Compatibility
# the-webkit-text-stroke

Compatibilidad con navegadores

Ver además