Gaya teksDecorationColorProperti _
Contoh
Mengubah warna garis, dalam teks yang digarisbawahi:
document.getElementById("demo").style.textDecorationColor = "red";
Definisi dan Penggunaan
Properti textDecorationColor menentukan warna dekorasi teks (garis bawah, garis luar, garis batas).
Catatan: Properti textDecorationColor hanya akan memiliki efek pada elemen dengan dekorasi teks yang terlihat.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
Sintaksis
Kembalikan properti textDecorationColor:
object.style.textDecorationColor
Setel properti textDecorationColor:
object.style.textDecorationColor = "color|initial|inherit"
Nilai properti
Value | Description |
---|---|
color | Specifies the color of the text-decoration |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detail Teknis
Nilai Bawaan: | warna saat ini |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti text-decoration-color dari sebuah elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti teks-dekorasi-warna
Objek Gaya