1.问题描述
问题如图:手机端placeholder文字偏上,垂直方向不居中,input光标显示偏上
2.解决方案
- css
.phoneNumber input {
width: 100%;
font-size: .34rem;
display: inline-block;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-family: PingFang-SC-Regular;
border: 1px solid #68be4c;
border-radius: .1rem;
text-indent: .4rem;
color: #333;
padding: .16rem 0;
float: left;
}
- html
<div class="phoneNumber">
<input type="text" placeholder="输入手机号码" />
</div>
3.成果
问题完美解决,placeholder文字完美居中,光标显示正常
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。