码迷,mamicode.com
首页 > 其他好文 > 详细

修改input placeholder样式

时间:2017-05-11 16:58:28      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:image   round   美化   参考   效果图   chrome   .com   img   blank   

<style>
/* 通用 */
::-webkit-input-placeholder {
    color: rgb(235, 126, 107);
}
::-moz-placeholder {
    color: rgb(235, 126, 107);
}

/* firefox 19+ */
:-ms-input-placeholder {
    color: rgb(235, 126, 107);
}

/* ie */
input:-moz-placeholder {
    color: rgb(235, 126, 107);
}

/* webkit专用 */
#field2::-webkit-input-placeholder {
    color: rgb(235, 126, 107);
}
#field3::-webkit-input-placeholder {
    color: rgb(235, 126, 107);
}
#field4::-webkit-input-placeholder {
    color: rgb(235, 126, 107);
}

/* mozilla专用 */
#field2::-moz-placeholder {
    color: rgb(235, 126, 107);
}
#field3::-moz-placeholder {
    color: rgb(235, 126, 107);
}
#field4::-moz-placeholder {
    color: rgb(235, 126, 107);
}
</style>

chrome下测试效果图:

技术分享

 参考:HTML5中input背景提示文字(placeholder)的CSS美化

修改input placeholder样式

标签:image   round   美化   参考   效果图   chrome   .com   img   blank   

原文地址:http://www.cnblogs.com/suiyueshentou/p/6841470.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!