CSS caret-color Właściwość
Przykład
Ustaw kolor kursora w elementach wejściowych:
input {
caret-color: red;
}
Definicja i użycie
Właściwość caret-color
określa kolor kursora (karetki) w danych wejściowych, obszarach tekstowych lub dowolnym elemencie, który można edytować.
Domyślna wartość: | automatyczny |
---|---|
Dziedziczny: | tak |
Animowalny: | nie. Przeczytaj o animacji |
Wersja: | CSS3 |
Składnia JavaScript: | obiekt .style.caretColor="czerwony" |
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Property | |||||
---|---|---|---|---|---|
caret-color | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
Składnia CSS
caret-color: auto|color|initial|inherit;
Wartości nieruchomości
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 |