How to change placeholder color on focus?

后端 未结 9 952
有刺的猬
有刺的猬 2020-12-04 11:05

How to change the color of placeholder when focus the input field? I use this css to set the default color, but how to change it on focus?

::-webkit-input-pl         


        
9条回答
  •  情话喂你
    2020-12-04 11:44

    Use star * to select everything

    *::-webkit-input-placeholder { color: #999; }
    
    
    *:-moz-placeholder { color: #999; }
    
    
    *::-moz-placeholder { color: #999; }
    
    
    *:-ms-input-placeholder { color: #999; }
    

提交回复
热议问题