CSS -Caret-Color- Eigenschaft
Beispiel
Legen Sie die Farbe des Cursors in Eingabeelementen fest:
input {
caret-color: red;
}
Definition und Verwendung
Die caret-color
Eigenschaft gibt die Farbe des Cursors (Caret) in Eingaben, Textbereichen oder anderen bearbeitbaren Elementen an.
Standardwert: | Auto |
---|---|
Vererbt: | ja |
Animierbar: | Nein. Lesen Sie mehr über animierbare |
Ausführung: | CSS3 |
JavaScript-Syntax: | Objekt .style.caretColor="red" |
Browser-Unterstützung
Die Zahlen in der Tabelle geben die erste Browserversion an, die die Eigenschaft vollständig unterstützt.
Property | |||||
---|---|---|---|---|---|
caret-color | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
CSS-Syntax
caret-color: auto|color|initial|inherit;
Eigenschaftswerte
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 |