How can i change the placeholder text color to white

This question already has an answer here:

  • Change an HTML5 input's placeholder color with CSS 31 answers

  • 你可以使用::placeholder伪类。

    input {
      background-color: #907;
    }
    
    input::placeholder {
      color: #fff;
    }
    <input type="text" placeholder="Enter Description Here" />
    链接地址: http://www.djcxy.com/p/12166.html

    上一篇: 有没有办法改变HTML5文本框水印的颜色?

    下一篇: 我如何将占位符文本颜色更改为白色