How to change an HTML5 input's placeholder color with CSS?
Answers
Answered by
0
to change color of placeholder text you have apply css, for that user pseudo element ::placeholder element
this all behaves different in different browser
<input type="text" placeholder="write name here" name="name"/>
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder { /* IE 10+ */
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
Similar questions