input placeholder属性 样式修改(颜色,大小,位置)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> input::-webkit-input-placeholder { /* WebKit, Blink, Edge */ /*placeholder的颜色*/ color: #000; } input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ /*placeholder的颜色*/ color: #000; } input::-moz-placeholder { /* Mozilla Firefox 19+ */ /*placeholder的颜色*/ color: #000; } input:-ms-input-placeholder { /* Internet Explorer 10-11 */ /*placeholder的颜色*/ color: #000; } input { border: 1px solid red; /*输入的颜色*/ color: red; } </style> </head> <body> <input type="text" placeholder="请输入手机号"> </body> </html>