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 | como se especifica |
| Animatable | as each of the properties of the shorthand:
|
| Canonical order | el orden único no-ambigüo definido por la gramática formal |
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 anchira 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( <rgb-component>#{3} )
<rgba()> = rgba( <rgb-component>#{3} , <alpha-value> )
<hsl()> = hsl( <hue>, <percentage>, <percentage> )
<hsla()> = hsla( <hue>, <percentage>, <percentage>, <alpha-value> )
<named-color> = <ident>
<deprecated-system-color> = ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowTextwhere
<rgb-component> = <integer> | <percentage>
<alpha-value> = <number>
<hue> = <number>
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 |
|---|---|---|
| Web Compatibility Standard The definition of '-webkit-text-stroke' in that specification. |
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) | No support | No support | (Yes) | (Yes) |
| Característica | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Soporte básico | ? | No support | No support | ? | ? |