光标颜色

186 阅读1分钟

光标的颜色:

  1. 继承自当前输入框字体的颜色,所以直接设置字体颜色
input{
    color:red;
}
  1. 直接给光标设置颜色:
input{
    caret-color:red;
}

其中caret为插入符号~

image.png