<view class="pages">
<view class="pagesTop">
<image mode='widthFix' src="https://sucai.suoluomei.cn/sucai_zs/images/20200831095626-1598838867%281%29.png">
</image>
</view>
<view bindtouchstart="touchMove" class="pagesButon" style="position: absolute;top:{
{
height}}rpx" bindtap="xioama">
哈哈哈
</view>
</view>
var app = getApp();
Page({
data: {
height:'302'
},
onLoad: function(options) {
setTimeout(() =>{
this.setData({
height:'741'
})
},500)
},
touchMove(e){
if(this.data.height == '302'){
this.setData({
height:'741'
})
}else{
this.setData({
height:'302'
})
}
},
})
.pages {
position: relative;
width: 100%;
}
.pagesTop {
width: 100%;
z-index: 1;
}
.pagesTop image {
width: 100%;
}
.pagesButon {
transition-duration: 1s;
width: 100%;
background: #fff;
color: #000;
height: 600rpx;
z-index: 99;
border-top-right-radius: 30rpx;
border-top-left-radius: 30rpx;
}