input组件会被顶到页面最顶级,但是textarea则在键盘的上方
系统:小米12,微信版本:8.043,基础库:3.23
// wxml
<scroll-view class="scrollBox" scroll-y>
<view class="box1">1</view>
<view class="box2">2</view>
<view class="box3">
<view>
<input type="text" placeholder="input组件"/>
</view>
<view>
<textarea placeholder="textarea组件"></textarea>
</view>
</view>
</scroll-view>
// wxss
.scrollBox{
width: 100vw;
height:100vh;
background-color: aqua
}
.box1{
height: 1200rpx;
padding: 20rpx;
background-color: blue;
}
.box2{
height: 1200rpx;
padding: 20rpx;
background-color: rgb(251, 255, 0);
}
.box3{
height: 100rpx;
padding: 20rpx;
background-color: rgb(255, 136, 0);
}
.box3>view{
margin-top: 20rpx;
border: 1px solid #000000;
}
后面我把scroll-view 组件去掉,输入框上推恢复了