微信小程序中带滚动条的按钮固定在底部不动,效果入下图:
样式如下:
wxml:
<view class="purchase-area">
<view class="purchase-btn">立即购买</view>
</view>
wxss:
.purchase-area{
position: fixed;
bottom: 10rpx;
width: 94%;
height: 80rpx;
text-align: center;
}
.purchase-btn{
position: relative;
line-height: 80rpx;
background-color: red;
color: white;
border-radius: 100rpx;
}