x
 
<!DOCTYPE html>
<html>
<head>
<style>
::-webkit-input-placeholder { /* Edge */
  color: red;
}
:-ms-input-placeholder { /* Internet Explorer */
  color: red;
}
::placeholder {
  color: red;
}
</style>
</head>
<body>
<p>请使用 ::placeholder 选择器来改变占位文本的颜色:</p>
<input type="text" name="fname" placeholder="First name">
</body>
</html>