首页 > 其他 > 详细

修改input placeholder样式

时间:2017-05-11 16:45:13      阅读:321      评论:0      收藏:0      [点我收藏+]
<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样式

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!