Propiedad de línea de decoración de texto CSS
Ejemplo
Establezca diferentes tipos de líneas de decoración de texto:
div.a
{
text-decoration-line: overline;
}
div.b
{
text-decoration-line: underline;
}
div.c
{
text-decoration-line: line-through;
}
div.d
{
text-decoration-line: overline underline;
}
Definición y uso
La text-decoration-line
propiedad establece el tipo de decoración de texto que se utilizará (como subrayado, sobrerayado, traspaso).
Sugerencia: observe también la propiedad text-decoration , que es una propiedad abreviada para text-decoration-line, text-decoration-style y text-decoration-color.
Nota: también puede combinar más de un valor, como subrayado y sobrerayado, para mostrar líneas debajo y sobre el texto.
Valor por defecto: | ninguna |
---|---|
Heredado: | No |
Animable: | No. Leer sobre animable |
Versión: | CSS3 |
Sintaxis de JavaScript: | objeto .style.textDecorationLine="overline" |
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- o -webkit- especifican la primera versión que funcionó con un prefijo.
Property | |||||
---|---|---|---|---|---|
text-decoration-line | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 7.1 -webkit- |
44.0 |
Sintaxis CSS
text-decoration-line: none|underline|overline|line-through|initial|inherit;
Valores de propiedad
Value | Description | Play it |
---|---|---|
none | Default value. Specifies no line for the text-decoration | |
underline | Specifies that a line will be displayed under the text | |
overline | Specifies that a line will be displayed over the text | |
line-through | Specifies that a line will be displayed through the text | |
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 textDecorationLine