No estándar
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
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 inicial | as each of the properties of the shorthand:
|
|---|---|
| Applies to | all elements |
| Heredable | yes |
| Media | visual |
| Valor calculado | as each of the properties of the shorthand:
|
| Animation type | as each of the properties of the shorthand:
|
| Canonical order | Canonical order |
Síntaxis
/* 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
<length> || <color>where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where
<rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )
<rgba()> = rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )
<hsl()> = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )
<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )where
<alpha-value> = <number> | <percentage>
<hue> = <number> | <angle>
Ejemplo
HTML
<p id="example">El trazo de este texto es rojo.</p>
CSS
#example {
font-size: 50px;
margin: 0;
-webkit-text-stroke: 2px red;
}
Especificaciones
| Especificación | Estado | Comentario |
|---|---|---|
| Compatibility Standard La definición de '-webkit-text-stroke' en esta especificación. |
Living Standard | Estandarización Inicial |
| Referencia CSS Safari '-webkit-text-stroke' en ese documento. |
Documentación no oficial y no estándar | Documentación Inicial |
Compatibilidad con los distintos navegadores
| Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Soporte básico | (Yes) | Sin soporte | Sin soporte | (Yes) | (Yes) |
| Característica | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Soporte básico | ? | Sin soporte | Sin soporte | ? | ? |