css3 placeholder text code example
Example 1: placeholder color in css
*::-webkit-input-placeholder {
color: red;
}
*:-moz-placeholder {
color: red;
opacity: 1;
}
*::-moz-placeholder {
color: red;
opacity: 1;
}
*:-ms-input-placeholder {
color: red;
}
*::-ms-input-placeholder {
color: red;
}
*::placeholder {
color: red;
}
Example 2: html css placeholder input font-size
Placeholder text will automatically inherit the font family and font size of the regular input text, but you may be in a situation where you want to change the placeholder text color. You can accomplish that with the ::placeholder pseudo-element.