以按钮为例:在index.wxml文件中加入:
<button class = "address-add">您好,欢迎访问AI图片内容识别</button>
在index.wxss文件中,加入:
/*添加地址按钮*/
.address-add {
position: fixed;
bottom: 0;
width: 100%;
}
我用相同原理做了一款浮动广告,如下。总能保持广告在页面最下方。通过bottom距离页面下方位置确定的。


以按钮为例:在index.wxml文件中加入:
<button class = "address-add">您好,欢迎访问AI图片内容识别</button>
在index.wxss文件中,加入:
/*添加地址按钮*/
.address-add {
position: fixed;
bottom: 0;
width: 100%;
}
我用相同原理做了一款浮动广告,如下。总能保持广告在页面最下方。通过bottom距离页面下方位置确定的。