Properti warna caret CSS
Contoh
Atur warna kursor di elemen input:
input {
caret-color: red;
}
Definisi dan Penggunaan
Properti caret-color
menentukan warna kursor (tanda sisipan) di input, area teks, atau elemen apa pun yang dapat diedit.
Nilai bawaan: | mobil |
---|---|
Diwarisi: | Ya |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.caretColor="merah" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
caret-color | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
Sintaks CSS
caret-color: 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 |