修改输入框placeholder文字默认颜色css用法
针对placeholder来设置你自己想要的颜色
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: red;
opacity: 1;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: red;
opacity: 1;
}
input:-ms-input-placeholder {
color: red;
opacity: 1;
}
input::-webkit-input-placeholder {
color: red;
opacity: 1;
}
</style>
</head>
<body>
<input type="text" name="" id="" value="" placeholder="请输入名字" />
</body>
</html>