Properti HTML DOM Style textDecorationColor
contoh
Mengubah warna teks digarisbawahi digarisbawahi:
document.getElementById("myP").style.textDecorationColor="red";
Coba »
Definisi dan Penggunaan
Atribut textDecorationColor menentukan dekorasi teks (underline garis bawah, overline overline, menggarisbawahi line-through) warna.
Catatan: Hanya unsur-unsur dengan terlihat text-decoration, properti textDecorationColor untuk bekerja.
Dukungan Browser
Hampir semua browser utama tidak mendukung properti textDecorationColor.
Firefox mendukung alternatif lain dari atribut properti yang properti MozTextDecorationColor.
tatabahasa
Kembali sifat textDecorationColor:
object .style.textDecorationColor
Pengaturan properti textDecorationColor:
object .style.textDecorationColor="color|initial|inherit"
Nilai properti
值 | 描述 |
---|---|
color | 规定文本修饰的颜色。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
rincian teknis
default: | currentcolor |
---|---|
Pengembalian: | String mewakili atribut text-decoration-warna elemen. |
versi CSS | CSS3 |
Artikel terkait
CSS Referensi: teks-Decoration-Color properti