控制input 输入框的placeholder

时间:2022-06-26 19:30:05
  /*webkit placeholder居右*/
::-webkit-input-placeholder
{
color: #e7e7e7;
text-indent: .3rem;
font-size: .40rem;
}
/*//firefox 4-18*/
:-moz-placeholder
{
color: #e7e7e7;
text-indent: .3rem;
font-size: .40rem;
}
/*//firefox 19+*/
::-moz-placeholder
{
color: #e7e7e7;
text-indent: .3rem;
font-size: .40rem; }
/*//ie*/
:-ms-input-placeholder
{
color: #e7e7e7;
text-indent: .3rem;
font-size: .40rem;
}

如图中代码,你可以更改placeholder的字体颜色,大小,间距