Propriété CSS text-decoration-style
Exemple
Définissez différents types de styles de décoration de texte :
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;
}
Définition et utilisation
La text-decoration-style
propriété définit le style de la décoration du texte (comme solide, ondulé, pointillé, tireté, double).
Conseil : examinez également la propriété text-decoration , qui est une propriété abrégée pour text-decoration-line, text-decoration-style et text-decoration-color.
Valeur par défaut: | solide |
---|---|
Hérité: | non |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.textDecorationStyle="ondulé" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Les nombres suivis de -moz- spécifient la première version qui a fonctionné avec un préfixe.
Property | |||||
---|---|---|---|---|---|
text-decoration-style | 57.0 | 79.0 | 36.0 6.0 -moz- |
12.1 | 44.0 |
Syntaxe CSS
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
Valeurs de propriété
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 |
Pages connexes
Tutoriel CSS : Texte CSS
Référence HTML DOM : propriété textDecorationStyle