Style textDecorationStyle- Eigenschaft
Beispiel
Zeigen Sie eine Wellenlinie unter dem an-Element an:
document.getElementById("demo").style.textDecorationStyle = "wavy";
Definition und Verwendung
Die Eigenschaft textDecorationStyle legt fest oder gibt zurück, wie die Zeile angezeigt wird, falls vorhanden.
Browser-Unterstützung
Property | |||||
---|---|---|---|---|---|
textDecorationStyle | 57.0 | 79.0 | 36.0 6.0 Moz |
12.1 | 44.0 |
Syntax
Geben Sie die textDecorationStyle-Eigenschaft zurück:
object.style.textDecorationStyle
Legen Sie die textDecorationStyle-Eigenschaft fest:
object.style.textDecorationStyle = "solid|double|dotted|dashed|wavy|initial|inherit"
Eigenschaftswerte
Value | Description |
---|---|
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 |
Technische Details
Standardwert: | fest |
---|---|
Rückgabewert: | Ein String, der die text-decoration-style-Eigenschaft eines Elements darstellt |
CSS-Version | CSS3 |
Verwandte Seiten
CSS-Referenz: text-decoration-style-Eigenschaft
❮ Style-Objekt