स्टाइल कैरेटकलर प्रॉपर्टी
उदाहरण
इनपुट फ़ील्ड के अंदर कर्सर का रंग लाल पर सेट करें:
document.getElementById("input1").style.caretColor = "red";
परिभाषा और उपयोग
कैरेटकलर प्रॉपर्टी इनपुट, टेक्स्ट एरिया, या संपादन योग्य किसी भी तत्व में कर्सर (कैरेट) का रंग निर्दिष्ट करती है।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
caretColor | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
वाक्य - विन्यास
कैरेटकलर संपत्ति लौटाएं:
object.style.caretColor
कैरेटकलर गुण सेट करें:
object.style.caretColor = "auto|color|initial|inherit"
सम्पत्ति की कीमत
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 |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | ऑटो |
---|---|
प्रतिलाभ की मात्रा: | एक स्ट्रिंग, एक तत्व के कैरेट रंग का प्रतिनिधित्व करता है |
सीएसएस संस्करण | CSS3 |
संबंधित पृष्ठ
सीएसएस संदर्भ: कैरेट-रंग संपत्ति
❮ स्टाइल ऑब्जेक्ट