Propiedad CSS text-decoration-thickness
Ejemplo
Establezca un grosor diferente de la línea de decoración para los elementos <h1>, <h2>, <h3> y <h4>:
h1 {
text-decoration: underline;
text-decoration-thickness: auto;
}
h2 {
text-decoration: underline;
text-decoration-thickness: 5px;
}
h3 {
text-decoration: underline;
text-decoration-thickness: 50%;
}
/* Use shorthand property */
h4 {
text-decoration:
underline solid red 50%;
}
Definición y uso
La text-decoration-thickness
propiedad especifica el grosor de la línea de decoración.
Valor por defecto: | auto |
---|---|
Heredado: | No |
Animable: | no, ver propiedades individuales . Leer sobre animable |
Versión: | CSS4 |
Sintaxis de JavaScript: | objeto .style.textDecorationThickness="5px" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
text-decoration-thickness | 89.0 | 89.0 | 70.0 | 12.1 | 75.0 |
Sintaxis CSS
text-decoration-thickness:
auto|from-font|length/percentage|initial|inherit;
Valores de propiedad
Value | Description |
---|---|
auto | The browser chooses the thickness of the decoration line |
from-font | If a font file contains information about a preferred thickness, use that value. If not, behave as auto |
length/percentage | Specifies the thickness as a length or % |
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
Referencia CSS: propiedad de decoración de texto
Tutorial de CSS: Decoración de texto CSS