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 |