改变input里placeholder的字体颜色
由于placeholder是html5的属性,仅支持html5的浏览器才支持placeholder,目前最新的firefox、chrome、safari以及ie10都支持,ie6到ie9都不支持。
css代码如下
input::-webkit-input-placeholder { /* WebKit browsers */ color: #ccc; } input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: #ccc; } input::-moz-placeholder { /* Mozilla Firefox 19+ */ color: #ccc; } input:-ms-input-placeholder { /* Internet Explorer 10+ */ color: #ccc; }