CSS metin-dekorasyon Özellik
Örnek
<h1>, <h2> ve <h3> öğeleri için farklı metin süslemeleri ayarlayın:
h1 {
text-decoration: overline;
}
h2 {
text-decoration: line-through;
}
h3 {
text-decoration: underline;
}
h4 {
text-decoration: underline
overline;
}
Aşağıda daha fazla "Kendiniz Deneyin" örnekleri.
Tanım ve Kullanım
Özellik text-decoration
, metne eklenen dekorasyonu belirtir ve aşağıdakiler için kestirme bir özelliktir:
- metin-dekorasyon-satırı (gerekli)
- metin-dekorasyon-renk
- metin-dekorasyon-tarzı
Varsayılan değer: | mevcut renk katı yok |
---|---|
Miras: | Hayır |
canlandırılabilir: | hayır, bireysel özelliklere bakın . Canlandırılabilir hakkında bilgi edinin |
Sürüm: | CSS1, CSS3'te yenilendi |
JavaScript sözdizimi: | nesne .style.textDecoration="alt çizgi" |
Tarayıcı Desteği
Tablodaki sayılar, özelliği tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Property | |||||
---|---|---|---|---|---|
text-decoration | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
CSS Sözdizimi
text-decoration: text-decoration-line text-decoration-color
text-decoration-style|initial|inherit;
Mülk değerleri
Value | Description |
---|---|
text-decoration-line | Sets the kind of text decoration to use (like underline, overline, line-through) |
text-decoration-color | Sets the color of the text decoration |
text-decoration-style | Sets the style of the text decoration (like solid, wavy, dotted, dashed, double) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Daha fazla örnek
Örnek
Daha fazla metin dekorasyonu ekleyin:
h1 {
text-decoration: underline overline dotted red;
}
h2 {
text-decoration: underline overline wavy
blue;
}
İlgili Sayfalar
CSS eğitimi: CSS Metni
HTML DOM referansı: textDecoration özelliği