需求input标签placehholder字体灰色,居中显示
方案:给input标签添加placeholder-style属性
<view class="form-item itemA">
<input placeholder="请输入手机号" type="text" class="input1" placeholder-style="font-size:24rpx;color:#999999;text-align:center;font-weight:500;"/>
</view>
<style lang="scss" scoped>
.form-item {
width: 572rpx;
height: 90rpx;
border-radius: 10rpx;
background: #FFFFFF;
overflow: hidden;
padding: 4rpx 4rpx;
border: 4rpx solid #E6EAF6;
box-sizing: border-box;
>input {
height: 100%;
background: #E6EAF6;
border-radius: 10rpx;
overflow: hidden;
}
}
</style>
效果图