<!DOCTYPE html>
<html>
<head>
<style>
input,textarea{
margin:10px 20px;
color: red;
text-shadow: 0px 0px 0px #000;
-webkit-text-fill-color: transparent;
background-color:#f5f5f5;
border:1px solid blue;
online:none;
}
input:focus ,textarea:focus{
text-shadow:0px 0px 0px green;
}
textarea{
margin-bottom:-20px;
}
</style>
</head>
<body>
<form>
input: <input type="text" /><br>
textarea: <textarea type="text" ></textarea>
</form>
</body>
</html>
欢迎分享本文,转载请保留出处:前端ABC » 控制input,textarea的输入光标颜色
前端ABC