如何修改placeholder样式 CCENOTE 2022-11-09 343 阅读1分钟 项目用经常遇到修改input的placeholder的颜色的需求,这里来看一下placeholder如何用css设置。 要改变placeholder的颜色就要使用到伪类::placeholder <style> input::placeholder { color: green; } </style> <input type="text" placeholder="hello world" style="color: red;">