最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
微信小程序实现蒙版弹窗效果
时间:2018-11-02 编辑:猪哥 来源:一聚教程网
本文实例为大家分享了微信小程序实现蒙版弹窗效果的具体代码,供大家参考,具体内容如下
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; } /*弹窗结束 */
效果图:
-
上一个: 微信小程序实现留言板
-
下一个: Vue.js 事件修饰符的使用教程
相关文章
- js实现音乐播放器代码展示 10-12
- js实现图片查看器代码展示 10-12
- JS中switch的四种写法介绍 10-12
- js实现新闻轮播效果教程 10-11
- JS实现简单的图片切换功能教程 10-11
- js实现下拉刷新和上拉加载解析 09-28