Propiedad de estilo de decoración de texto CSS
Ejemplo
Establezca diferentes tipos de estilos de decoración de texto:
div.a
{
text-decoration-line: underline;
text-decoration-style: solid;
}
div.b
{
text-decoration-line: underline;
text-decoration-style: wavy;
}
div.c
{
text-decoration-line: underline;
text-decoration-style: double;
}
div.d
{
text-decoration-line: overline underline;
text-decoration-style: wavy;
}
Definición y uso
La text-decoration-style
propiedad establece el estilo de la decoración del texto (como sólido, ondulado, punteado, discontinuo, doble).
Sugerencia: observe también la propiedad text-decoration , que es una propiedad abreviada para text-decoration-line, text-decoration-style y text-decoration-color.
Valor por defecto: | sólido |
---|---|
Heredado: | No |
Animable: | No. Leer sobre animable |
Versión: | CSS3 |
Sintaxis de JavaScript: | objeto .style.textDecorationStyle="ondulado" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Los números seguidos de -moz- especifican la primera versión que funcionó con un prefijo.
Property | |||||
---|---|---|---|---|---|
text-decoration-style | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 | 44.0 |
Sintaxis CSS
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
Valores de propiedad
Value | Description | Play it |
---|---|---|
solid | Default value. The line will display as a single line | |
double | The line will display as a double line | |
dotted | The line will display as a dotted line | |
dashed | The line will display as a dashed line | |
wavy | The line will display as a wavy line | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
páginas relacionadas
Tutorial CSS: Texto CSS
Referencia HTML DOM: propiedad textDecorationStyle