Styl caretColor Property
Voorbeeld
Stel die kleur van die wyser na rooi binne 'n invoerveld:
document.getElementById("input1").style.caretColor = "red";
Definisie en gebruik
Die caretColor-eienskap spesifiseer die kleur van die wyser (karet) in invoere, teksareas of enige element wat bewerkbaar is.
Blaaierondersteuning
Property | |||||
---|---|---|---|---|---|
caretColor | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
Sintaksis
Gee die caretColor-eienskap terug:
object.style.caretColor
Stel die caretColor-eienskap:
object.style.caretColor = "auto|color|initial|inherit"
Eiendomswaardes
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 |
Tegniese besonderhede
Standaard waarde: | outo |
---|---|
Terugkeerwaarde: | 'n String, wat die karetkleur van 'n element voorstel |
CSS weergawe | CSS3 |
Verwante bladsye
CSS verwysing: karet-kleur eiendom
❮ Stylvoorwerp