Stijl tekstDecoratieLijn eigenschap
Voorbeeld
Toon een element met een streep door de tekst:
document.getElementById("demo").style.textDecorationLine = "line-through";
Definitie en gebruik
De eigenschap textDecorationLine bepaalt of retourneert welk type regel, indien aanwezig, de decoratie zal hebben.
Opmerking: U kunt de textDecorationLine ook instellen met de eigenschap textDecoration, een verkorte eigenschap voor de eigenschappen textDecorationLine, textDecorationStyle en textDecorationColor.
Opmerking: u kunt ook meer dan één waarde combineren, zoals onderstrepen en bovenstrepen om lijnen zowel onder als boven de tekst weer te geven.
Browserondersteuning
Property | |||||
---|---|---|---|---|---|
textDecorationLine | 57.0 | 79.0 | 36.0 6.0 Moz |
7.0 Webkit | 44.0 |
Syntaxis
Retourneer de eigenschap textDecorationLine:
object.style.textDecorationLine
Stel de eigenschap textDecorationLine in:
object.style.textDecorationLine = "none|underline|overline|line-through|initial|inherit"
Eigendomswaarden
Value | Description |
---|---|
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 |
Technische details
Standaardwaarde: | geen |
---|---|
Winstwaarde: | Een tekenreeks, die de eigenschap text-decoration-line van een element vertegenwoordigt |
CSS-versie | CSS3 |
Gerelateerde pagina's
CSS-referentie: eigenschap text-decoration-line
❮ Stijlobject