zoukankan      html  css  js  c++  java
  • input placeholder属性 样式修改(颜色,大小,位置)

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4     <meta charset="utf-8">
     5     <title></title>
     6     <style>
     7     
     8     input::-webkit-input-placeholder {
     9         /* placeholder颜色  */
    10         color: #aab2bd;
    11         /* placeholder字体大小  */
    12         font-size: 12px;
    13         /* placeholder位置  */
    14         text-align: right;
    15     }
    16     input {
    17         border: 1px solid red;
    18     }
    19     </style>
    20 </head>
    21 <body>
    22     
    23     <input type="text" placeholder="请输入手机号">
    24     
    25 </body>
    26 </html>

    备注:

    ::-webkit-input-placeholder { /* WebKit, Blink, Edge */
        color:    #909;
    }
    :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
       color:    #909;
    }
    ::-moz-placeholder { /* Mozilla Firefox 19+ */
       color:    #909;
    }
    :-ms-input-placeholder { /* Internet Explorer 10-11 */
       color:    #909;
    }

    转载自:https://www.cnblogs.com/ooo0/p/6141764.html

  • 相关阅读:
    修改注释的风格
    PHP in_array
    PHP end
    PHP each
    GitHub和SourceTree入门教程
    面试题解析(不定时更新)
    Container With Most Water
    Minimum Path Sum
    Generate Parentheses
    Unique Paths
  • 原文地址:https://www.cnblogs.com/heroljy/p/9669349.html
Copyright © 2011-2022 走看看