css_day05_修改input中placeholder的默认属性

来源:互联网 发布:c语言编程技巧 编辑:程序博客网 时间:2024/05/23 01:01

一点一点地积累,慢慢地你会得到你想要的东西,为自己而加油吧!
修改input中placeholder的默认样式

<html>    <head>        <meta charset="UTF-8">        <title>修改input中placeholder的默认样式</title>        <style>            input{                width:500px;                height:40px;            }            .change::-webkit-input-placeholder{                font-size:20px;                color:red;            }            /*Mozilla Firefox 4 to 18*/            :-moz-placeholder{                font-size:20px;                color:red;            }            /*Mozilla Firefox 19+*/            ::-moz-placeholder{                font-size:20px;                color:red;            }            :-ms-input-placeholder{                font-size:20px;                color:red;            }            /*注意:和::的区别*/        </style>    </head>    <body>        <input class="change" type="text" placeholder="修改placeholder的默认样式">    </body></html>
原创粉丝点击