Stil metniDekorasyon Özellik
Örnek
Bir öğe için metin dekorasyonunu ayarlayın:
document.getElementById("demo").style.textDecoration = "underline overline";
Tanım ve Kullanım
textDecoration özelliği, bir metin için bir veya daha fazla süslemeyi ayarlar veya döndürür.
İpucu: Bir öğe için birden fazla dekorasyon türü belirtmek için, dekorasyon türlerinin boşlukla ayrılmış bir listesini belirtin.
Tarayıcı Desteği
Property | |||||
---|---|---|---|---|---|
textDecoration | Yes | Yes | Yes | Yes | Yes |
Sözdizimi
textDecoration özelliğini döndürün:
object.style.textDecoration
textDecoration özelliğini ayarlayın:
object.style.textDecoration = "none|underline|overline|line-through|blink|initial|inherit"
Mülk değerleri
Value | Description |
---|---|
none | Defines a normal text. This is default |
underline | Defines a line under the text |
overline | Defines a line over the text |
line-through | Defines a line 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: | Metne eklenen dekorasyonu temsil eden bir String |
CSS Sürümü | CSS1 |
Daha fazla örnek
Örnek
Bir öğenin metin dekorasyonunu döndür:
alert(document.getElementById("demo").style.textDecoration);
İlgili Sayfalar
CSS eğitimi: CSS Metni
CSS referansı: metin-dekorasyon özelliği
❮ Stil Nesnesi