小程序animation动画效果综合应用案例(交流QQ群:604788754)
如果案例有问题,可到QQ群找到今日相关压缩文件下载测试。
WXML:
<view class="cebian">
<view animation="{{animation}}">
<view class="cebian01">
<text class="cebian011">电话</text>
</view>
<view class="cebian02">
<text class="cebian021">发布</text>
</view>
<view class="cebian03">
<text class="cebian031">咨询</text>
</view>
</view> <view class="cebian04" bindtap="anniuhide">
<image src="{{anniuimg}}" animation="{{animations}}"></image>
</view>
</view>
WXSS:
.cebian {
width: 50px;
height: auto;
display: flex;
flex-direction: column;
position: fixed;
bottom: 60px;
right: 20px;
z-index: ;
overflow: hidden;
}
.anniu{
position: relative;
left: 50px;
}
.cebian01, .cebian02,.cebian03,.cebian04 {
height: 50px;
width: 50px;
text-align: center;
line-height: 50px;
border-radius: 60px;
color: #fff;
}
.cebian02,.cebian03,.cebian04{
margin-top: 10px;
}
.cebian01{
background-color: #50cb67;
}
.cebian02{
background-color: #6785e5;
}
.cebian03{
background-color: #ec4149;
}
.cebian04{
background-color: #;
position: relative;
}
.cebian04>image{
width: 30px;
height: 30px;
position: relative;
top: 10px; }
JS:
Page({
data: {
jiantous: false,
anniuimg: '/picture/jiantou01.png',
},
/*右侧按钮部分效果*/
onReady: function () {
this.animation = wx.createAnimation();
this.animations = wx.createAnimation()
},
anniuhide: function () {
var leftjian = this.data.jiantous;
if (leftjian == false) {
this.animation.translate(, ).step();
this.animations.rotate().translate(,).step();
leftjian = true;
} else {
this.animation.translate(, ).step();
this.animations.rotate().translate(, ).step();
leftjian = false;
}
this.setData({
animation: this.animation.export(),
animations: this.animations.export(),
jiantous: leftjian,
});
},
})
效果图:
小程序animation动画效果综合应用案例(交流QQ群:604788754)的更多相关文章
- 小程序animation动画效果(小程序组件案例)
WXML <view class="container"> <view class="page-body"> <view clas ...
- 微信小程序Animation动画的使用
目录 1,前言 2,属性 3,使用 1,前言 和css3动画不同,小程序中动画是主要是通过js控制的,简单来说就是创建一个动画实例animation.调用实例的方法来定义动画效果.最后通过动画实例的e ...
- 微信小程序animation动画2种方法
这里介绍 2 种方法一种是常规的小程序方法操作,另一种是引入动画库 1. 常规动画操作设置 wxml: <view> <view bindtap="clickMe" ...
- 微信小程序的动画效果
前言 由于公司计划有变,所以从H5页面改成去小程序写.所以在着手开发小程序.本人也不是什么前端高手,只是一名写后端偶尔写写前端的渣渣.请前端大神们勿喷. 一.什么是微信小程序? 小程序在我的理解中只是 ...
- .net mvc 站点自带简易SSL加密传输 Word报告自动生成(例如 导出数据库结构) 微信小程序:动画(Animation) SignalR 设计理念(一) ASP.NET -- WebForm -- ViewState ASP.NET -- 一般处理程序ashx 常用到的一些js方法,记录一下 CryptoJS与C#AES加解密互转
.net mvc 站点自带简易SSL加密传输 因项目需要,传输数据需要加密,因此有了一些经验,现简易抽出来分享! 请求:前端cryptojs用rsa/aes 或 rsa/des加密,后端.net ...
- Android中xml设置Animation动画效果详解
在 Android 中, Animation 动画效果的实现可以通过两种方式进行实现,一种是 tweened animation 渐变动画,另一种是 frame by frame animation ...
- android中设置Animation 动画效果
在 Android 中, Animation 动画效果的实现可以通过两种方式进行实现,一种是 tweened animation 渐变动画,另一种是 frame by frame animation ...
- 模仿百度首页“元宵节汤圆”动图,并实现360°不停旋转(CSS3的animation动画效果)
模仿百度首页“元宵节汤圆”动图,并实现360°不停旋转(CSS3的animation动画效果) 效果图: 切图地址: https://ss1.bdstatic.com/5eN1bjq8AAUYm2zg ...
- 小程序中通过判断id来删除数据,当数据长度为0时,显示隐藏部分(交流QQ群:604788754)
欢迎加入小程序交流群:本群定期更新在工作种遇到的小知识(交流QQ群:604788754) WXML: <!--遍历循环的数据部分--> <block wx:for="{{d ...
随机推荐
- Bof基础实践
Bof基础 Bof原理 Linux下进程地址空间的布局 典型的堆栈结构 上图中可以看到栈中有return address还有局部变量,也就是函数的参数,bof攻击是利用上参数的溢出将返回地址retur ...
- TCP 的连接建立:采用三报文握手
- Unity3D学习笔记(十七):IK动画、粒子系统和塔防
新动画系统: 反向动力学动画(IK功能): 魔兽世界(头部动画),神秘海域(手部动画),人类一败涂地(手部动画) 如何启用(调整) 1.必须是新动画系统Animator 设置头.手.肘的目标点 2.动 ...
- .Net Core集成Office Web Apps(二)
想要使用OWA需要一台单独的服务器来部署,这对很多人造成困难.而写该文的目的是为了分享有个OWA的集成步骤,它不仅适用于.Net开发环境,其它语言也是一样的,只要实现了需要的服务接口.并且该文不局限与 ...
- React Native的SliderIOS滑块组件
import React,{Component}from 'react'; import { AppRegistry, StyleSheet, Text, View, SliderIOS, } fro ...
- Java I/O学习 文件读写工具
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import jav ...
- hdu 1005 矩阵快速幂
#include<iostream> #include<cstdio> #include<cmath> #include<string> #includ ...
- bugfree 数据库配置 显示No such file or directory
把数据库服务器 localhost 改成127.0.0.1 sudo vi /etc/hosts 增加: 127.0.0.1 localhost 127.0.0.1 你的hostname ...
- 《剑指offer》第二十六题(树的子结构)
// 面试题26:树的子结构 // 题目:输入两棵二叉树A和B,判断B是不是A的子结构. #include <iostream> struct BinaryTreeNode { doubl ...
- php 7.2 安装 mcrypt 扩展: mcrypt 扩展从 php 7.1.0 开始废弃;自 php 7.2.0 起,会移到 pecl
升级 php 7.2 后,使用微信提供的加解密代码时,提示 call to undefined function mcrypt_module_open() :大脑疯狂运转1秒钟后,得出结论:php 7 ...