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;
    }
    
  • 相关阅读:
    Vue--Vue-CLI服务命令、项目结构、自定义配置
    Vue--Vue-CLI创建项目
    Git
    前后端vue和django配置
    Django REST framework(DRF)
    Vue各种配置
    Vue组件
    vue项目搭建
    VUE基础
    Django中间件详解
  • 原文地址:https://www.cnblogs.com/ygunoil/p/14117467.html
Copyright © 2011-2022 走看看