스타일 caretColor 속성
예시
입력 필드 내에서 커서의 색상을 빨간색으로 설정합니다.
document.getElementById("input1").style.caretColor = "red";
정의 및 사용
caretColor 속성은 입력, 텍스트 영역 또는 편집 가능한 모든 요소의 커서(캐럿) 색상을 지정합니다.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
caretColor | 57.0 | 79.0 | 53.0 | 11.1 | 44.0 |
통사론
caretColor 속성을 반환합니다.
object.style.caretColor
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 |
기술적 세부 사항
기본값: | 자동 |
---|---|
반환 값: | 요소의 캐럿 색상을 나타내는 String |
CSS 버전 | CSS3 |
관련 페이지
CSS 참조: caret-color 속성
❮ 스타일 개체