uniapp input 解决 placeholder 垂直不居中,偏上的问题
前言: uniapp ios 版本 ios 低版本中会出现 placeholder 不居中 偏上问题的发生。
解决:
1.假设 input 的高度为 70rpx; 2.设置 input line-height: 70rpx;
.end-input {
display: flex;
justify-content: center;
align-items: center;
background: #F4F4F4;
border-radius: 4upx;
height: 70upx;
font-size: 28upx;
line-height: 70upx;
font-family: PingFang SC;
font-weight: 500;
color: #848484;
}
这样能保证会在居中,并且适配app h5 小程序。