新建一个html,里面写一个input标签,修改他的样式placeholder样式如下:
input::-webkit-input-placeholder {
color: rgba(145, 174, 255, 1);
}
input::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: rgba(145, 174, 255, 1);
}
input::-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: rgba(145, 174, 255, 1);
}
input::-ms-input-placeholder {
/* Internet Explorer 10-11 */
color: rgba(145, 174, 255, 1);
}
注:在Ie9及以下的版本不支持这样修改,需写js兼容