输入框focus的时候 placeholder会位移
发布于 6 年前 作者 uqiao 3625 次浏览 来自 问答

<view class=‘list’ bindtap=‘clickName’>

<view class=‘list_left’>姓名</view>

<view class=‘list_right’>

<input class=‘list_input’ placeholder=‘请输入姓名’ focus="{{focusName}}" placeholder-class=“input-placeholder” confirm-type=“next” bindinput=“inputName”></input>

</view>

</view>

.list {

height: 88rpx;

display: flex;

line-height: 88rpx;

padding: 0 28rpx;

box-sizing: border-box;

justify-content: space-between;

border-bottom: 1rpx solid #f5f5f5;

align-items: center;

}

.list_input {

text-align: right;

padding-right: 20rpx;

}

.input-placeholder{

color: #999;

font-size: 27rpx;

}

回到顶部