Styl teksDecorationLine Property
Voorbeeld
Vertoon 'n element met 'n lyn deur die teks:
document.getElementById("demo").style.textDecorationLine = "line-through";
Definisie en gebruik
Die textDecorationLine-eienskap stel of gee terug watter tipe lyn, indien enige, die versiering sal hê.
Let wel: Jy kan ook die textDecorationLine stel deur die textDecoration-eienskap te gebruik, wat 'n korthandeienskap is vir die textDecorationLine, textDecorationStyle en die textDecorationColor-eienskappe.
Let wel: Jy kan ook meer as een waarde kombineer, soos onderstreep en oorstreep om lyne beide onder en oor die teks te vertoon.
Blaaierondersteuning
Property | |||||
---|---|---|---|---|---|
textDecorationLine | 57.0 | 79.0 | 36.0 6.0 Moz |
7.0 Webkit | 44.0 |
Sintaksis
Gee die textDecorationLine-eienskap terug:
object.style.textDecorationLine
Stel die textDecorationLine-eienskap:
object.style.textDecorationLine = "none|underline|overline|line-through|initial|inherit"
Eiendomswaardes
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 |
Tegniese besonderhede
Standaard waarde: | geen |
---|---|
Terugkeerwaarde: | 'n String, wat die teks-versiering-lyn-eienskap van 'n element verteenwoordig |
CSS weergawe | CSS3 |
Verwante bladsye
CSS verwysing: teks-versiering-lyn eiendom
❮ Stylvoorwerp