修改placeholder的样式
.txt-word:empty:before {
padding: 10px;
box-sizing: border-box;
content: attr(placeholder);
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
line-height: 22px;
color: rgba(178, 178, 178, 1);
}
.txt-word:focus:before {
content: none;
}
之后会发现focus之后有白框:
修改默认focus之后自动添加白框的样式
.txt-word:focus{
border:none;
outline: none;
}
完美的解决问题!!!