改变输入框光标颜色效果:
label {
display: block;
padding-bottom: 5px;
font-weight: bold;
font-size: 16px;
}
input {
display: block;
padding: 0 20px;
outline: none;
border: 1px solid #ccc;
width: 100%;
height: 40px;
caret-color: blue;
transition: all 300ms;
}
<div>
<label>名字</label>
<input type="text" placeholder="请输入你的名字">
</div>