关键: position: fixed;
wxml:
<navigator url="/pages/issue/index">
<image class=\'img\' src=\'/assets/images/Home/add.png\' bindtap=\'add\'></image>
</navigator>
wxss:
.img{
float: right;
position: fixed;
bottom: 120rpx;
right: 20rpx;
width: 80rpx;
height: 80rpx;
}
js:
add(e){
console.log(e);
},
学习至:(3条消息) 微信小程序-组件悬浮_BlessingXRY的博客-CSDN博客