Stil textDecorationLine Özellik
Örnek
Metin boyunca bir çizgi ile bir öğe görüntüleyin:
document.getElementById("demo").style.textDecorationLine = "line-through";
Tanım ve Kullanım
textDecorationLine özelliği, varsa dekorasyonun ne tür bir çizgiye sahip olacağını belirler veya döndürür.
Not: textDecorationLine, textDecorationLine, textDecorationStyle ve textDecorationColor özellikleri için kısa el özelliği olan textDecoration özelliğini kullanarak da textDecorationLine ayarlayabilirsiniz.
Not: Metnin hem altındaki hem de üstündeki satırları görüntülemek için alt çizgi ve üst çizgi gibi birden fazla değeri birleştirebilirsiniz .
Tarayıcı Desteği
Property | |||||
---|---|---|---|---|---|
textDecorationLine | 57.0 | 79.0 | 36.0 6.0 Moz |
7.0 Webkit | 44.0 |
Sözdizimi
textDecorationLine özelliğini döndürün:
object.style.textDecorationLine
textDecorationLine özelliğini ayarlayın:
object.style.textDecorationLine = "none|underline|overline|line-through|initial|inherit"
Mülk değerleri
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 |
Teknik detaylar
Varsayılan değer: | Yok |
---|---|
Geri dönüş değeri: | Bir öğenin text-decoration-line özelliğini temsil eden bir String |
CSS Sürümü | CSS3 |
İlgili Sayfalar
CSS referansı: metin-dekorasyon-çizgisi özelliği
❮ Stil Nesnesi