change placeholder color css code example
Example 1: css placeholder color
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: pink;
}
::-moz-placeholder { /* Firefox 19+ */
color: pink;
}
:-ms-input-placeholder { /* IE 10+ */
color: pink;
}
:-moz-placeholder { /* Firefox 18- */
color: pink;
}
Example 2: css style placeholder
input::-webkit-input-placeholder {/* Chrome/Opera/Safari/Edge */
/*styles here*/
}
input::-ms-input-placeholder { /* Microsoft Edge */
/*styles here*/
}
input:-ms-input-placeholder {/* IE 10+ */
/*styles here*/
}
input::-moz-placeholder {/* Firefox 19+ */
opacity: 1; /*Firefox by default has an opacity object that usually is ideal to reset so it matches webkit*/
/*styles here*/
}
input:-moz-placeholder {/* Firefox 18- */
opacity: 1; /*Firefox by default has an opacity object that usually is ideal to reset so it matches webkit*/
/*styles here*/
}
input::placeholder {
/*styles here*/
}
Example 3: placeholder color in css
/* do not group these rules */
*::-webkit-input-placeholder {
color: red;
}
*:-moz-placeholder {
/* FF 4-18 */
color: red;
opacity: 1;
}
*::-moz-placeholder {
/* FF 19+ */
color: red;
opacity: 1;
}
*:-ms-input-placeholder {
/* IE 10+ */
color: red;
}
*::-ms-input-placeholder {
/* Microsoft Edge */
color: red;
}
*::placeholder {
/* modern browser */
color: red;
}