คุณสมบัติCSS คาเร็ตสี
ตัวอย่าง
กำหนดสีของเคอร์เซอร์ในองค์ประกอบอินพุต:
input {
caret-color: red;
}
ความหมายและการใช้งาน
คุณสมบัติcaret-color
ระบุสีของเคอร์เซอร์ (คาเร็ต) ในอินพุต พื้นที่ข้อความ หรือองค์ประกอบใดๆ ที่สามารถแก้ไขได้
ค่าเริ่มต้น: | รถยนต์ |
---|---|
รับการถ่ายทอด: | ใช่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.caretColor="red" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
caret-color | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
ไวยากรณ์ CSS
caret-color: 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 |