-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 característica no es parte de los estándares. No la uses en sitios Web en producción: no funcionará para todos los usuarios. Podrían haber también incompatibilidades considerables entre distintas implementaciones y el comportamiento podría cambiar en el futuro.

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

<length>

La anchura del trazo.

<color>

El color del trazo.

Síntaxis Formal

-webkit-text-stroke = 
<line-width> ||
<color>

<line-width> =
<length [0,∞]> |
thin |
medium |
thick

Ejemplo

HTML

html
<p id="example">El trazo de este texto es rojo.</p>

CSS

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

Especificaciones

Specification
Compatibility
# the-webkit-text-stroke

Compatibilidad con navegadores

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
-webkit-text-stroke

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Ver además