Gaya caretColor Property
Contoh
Atur warna kursor menjadi merah di dalam kolom input:
document.getElementById("input1").style.caretColor = "red";
Definisi dan Penggunaan
Properti caretColor menentukan warna kursor (tanda sisipan) di input, area teks, atau elemen apa pun yang dapat diedit.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
caretColor | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
Sintaksis
Kembalikan properti caretColor:
object.style.caretColor
Setel properti caretColor:
object.style.caretColor = "auto|color|initial|inherit"
Nilai properti
Value | Description |
---|---|
auto | Default. Browsers uses the currentColor for the caret |
color | Specifies a color to use for the caret. All legal color values can be used (rgb, hex, named-color, etc). For more information on legal values, read our CSS Colors Tutorial |
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: | mobil |
---|---|
Nilai Kembali: | Sebuah String, mewakili warna tanda sisipan suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti caret-color
Objek Gaya