Properti Style textDecorationColor

Definisi dan penggunaan

textDecorationColor Properti menentukan warna dekori teks (garis bawah, garis atas, garis penghapus).

Perhatian:textDecorationColor Properti ini hanya berlaku untuk elemen yang memiliki dekori teks yang terlihat.

Lihat juga:

Panduan CSS:Properti text-decoration-color

Contoh

Ubah warna garis teks berbawah:

document.getElementById("demo").style.textDecorationColor = "red";

Coba sendiri

Syarat

Kembalikan properti textDecorationColor:

objek.style.textDecorationColor

Setel properti textDecorationColor:

objek.style.textDecorationColor = "Warna|initial|inherit"

Nilai properti

Nilai Deskripsi
Warna Tentukan warna dekori teks.
initial Setel properti ini ke nilai baku. Lihat initial.
inherit Mengambil properti ini dari elemen orangtua. Lihat inherit.
Detil Teknis
Nilai baku: currentColor
Nilai kembalian: String, menunjukkan warna elemen Properti text-decoration-color.
Versi CSS: CSS3

Dukungan peramban

Tabel angka menunjukkan versi peramban pertama yang mendukung sifat ini.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
57 79.0 36.0 7.1 Webkit 44.0