input placeholder属性 样式修改(颜色,大小,位置)

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style>
    
    input::-webkit-input-placeholder {
        /* placeholder颜色  */
        color: #aab2bd;
        /* placeholder字体大小  */
        font-size: 12px;
        /* placeholder位置  */
        text-align: right;
    }
    input {
        border: 1px solid red;
    }
    </style>
</head>
<body>
    
    <input type="text" placeholder="请输入手机号">
    
</body>
</html>
input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
    color:    #909;
}
input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
   color:    #909;
}
input::-moz-placeholder { /* Mozilla Firefox 19+ */
   color:    #909;
}
input:-ms-input-placeholder { /* Internet Explorer 10-11 */
   color:    #909;
}

  

posted @ 2019-01-07 19:59  我爱大西瓜  阅读(300)  评论(0编辑  收藏  举报