本文实例为大家分享了微信小程序实现蒙版弹窗效果的具体代码,供大家参考,具体内容如下
X 立即充值 充值
js:
// 点击充值弹窗
submit: function () {
this.setData({
showModal: true
})
},
preventTouchMove: function () {
},
close_mask: function () {
this.setData({
showModal: false
})
},
CSS:
css;">/* 点击充值弹窗 */
.mask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
z-index: 9000;
opacity: 0.7;
}
.modalDlg {
width: 580rpx;
height: 450rpx;
position: fixed;
top: 50%;
left: 0;
z-index: 9999;
margin: -370rpx 85rpx;
background-color: #fff;
border-radius: 36rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.recharge_amount {
color: #aaa;
width: 450rpx;
height: 80rpx;
background: #f1f1f1;
text-align: center;
border-radius: 12rpx;
margin-top: 56rpx;
text-indent: 0;
}
.save_money {
color: #fff;
width: 270rpx;
height: 80rpx;
line-height: 80rpx;
background: #d95155;
text-align: center;
border-radius: 12rpx;
margin-top: 80rpx;
font-size: 28rpx;
text-indent: 0em;
}
.close_mask {
color: #000;
position: relative;
left: 40%;
/* top: -82%; */
font-size: 32rpx;
}
/*弹窗结束 */
效果图:
从需求到上线:AI低代码定制校园服务管理系统全流程记录
智能体“断舍离”:豆包和千问关停自建角色 AI情感陪伴告别野蛮生长
异环配置要求有多高
调试 Agent 的 3 个姿势:日志 断点 可视化 第49篇-E35
MCP(Model Context Protocol)入门与实践:让AI Agent实现跨进程工具调用
花 3 个月从零写了个 AI Coding Agent:HumanEval 跑出 87.8% 和 GPT-4o 持平