微信小程序商品筛选,侧方弹出动画选择页面
2017-12-22 17:27
204 查看
微信小程序动画原文档地址
动画api 请求参数
timingFunction 有效值:
欢迎加群讨论:群号578385176
动画api 请求参数
timingFunction 有效值:
wxss
.animation{ background: rgba(0,0,0,0.2); /* background: #000; */ z-index: 999; float: left; right: -100vh;//动画初始前向右移100vh width: 100%; height: 100%; } .animation-content{ width: 80%; height: 100%; background: #fff; position: absolute; right: 0; }
wxml代码
<view class='animation' animation="{{animationData}}" style="height:100%;position:fixed;visibility:{{show ? 'visible':'hidden'}}"> <view class='animation-content'> <view class='pricezone'> <view class='pztitle'> <text>价格区间(元)</text> </view> <view class='inputzone'> <input type='digit' bindinput="bindKeyInput" placeholder="最低价"/> <text style='color:#ddd'>-</text> <input type='digit' bindinput="bindKeyInput" placeholder="最高价"/> </view> </view> </view>
js代码
filter:function(e){ //点击筛选事件 var animation = wx.createAnimation({//创建动画 duration: 1000, timingFunction: 'ease', width:300, height:800, top:0, bottom:0, right:0, backgroundColor:'#fff', opcity:0.5 }) this.animation = animation animation.translateX(-100 + 'vh').step() //动画效果向右滑动100vh this.setData({ animationData: animation.export(), show:true }) },
效果图
欢迎加群讨论:群号578385176
相关文章推荐
- 微信小程序实战篇:商品属性联动选择(案例)
- 微信小程序自定义对话框+弹出和隐藏动画详解
- 微信小程序自定义对话框弹出和隐藏动画
- 微信小程序-自制弹出框禁止页面上下滑动
- 微信小程序开发----一打开小程序出现选择弹出框
- [置顶] 微信小程序自定义对话框+弹出和隐藏动画详解
- 微信小程序商品详情页规格属性选择示例代码
- 微信小程序商品循环列表点击弹出当前的商品信息
- 微信小程序商品详情页的底部弹出框
- 微信小程序商品详情页的底部弹出框效果
- 微信小程序弹出自定义模态框,禁止底部页面滚动事件
- 微信小程序 页面显示加载动画
- 微信小程序下拉筛选菜单WXDropDownMenu组件实现下拉动画
- 微信小程序商品详情页规格属性选择
- 微信小程序商品详情页交互源码(选择商品类型切换、预览商品图片)
- 微信小程序开发 -页面布局介绍- 附简单小程序实例(底部)
- 微信小程序设置启动页面
- 微信小程序 页面跳转传递值几种方法详解
- 微信小程序之页面跳转、传参
- android录音时弹出权限选择框影响录音动画显示问题