css更改placeholder


1.加入!important

2.但是不建议使用https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-input-placeholder

3.调试,在settings里面设置

 

    #field3::-moz-placeholder {
        /*font-style:italic !important;*/
        /*text-decoration:overline !important;*/
        /*letter-spacing:3px !important;*/
        color:red !important;
    }
    #field3::-webkit-input-placeholder {
        /*font-style:italic !important;*/
        /*text-decoration:overline !important;*/
        /*letter-spacing:3px !important;*/
        color:red !important;
    }
</style>
    <!--<div id="container" style="min-width: 400px;height: 400px;background: slategrey"></div>-->
<input type="text" name="lastname" id="field3" value="Mouse" placeholder="Search W3School"/>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM