微信小程序——悬浮按钮

2022-12-15,,,

关键:    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博客

微信小程序——悬浮按钮的相关教程结束。

《微信小程序——悬浮按钮.doc》

下载本文的Word格式文档,以方便收藏与打印。