animation

css3D动画

大兔子大兔子 提交于 2020-04-07 20:38:00
创建3D动画是需要用到@keyframes,要有个统一的名字。需要将animation绑定到一个选择器上面,并且animation需要匹配合适的浏览器。然后@keyframels设置动态,from~to等同于0%~100%,同理需要匹配浏览器格式。使用@keyframels设置动画时,最起码需要设置动画名称和时长两个属性,否则没有动画效果 来源: oschina 链接: https://my.oschina.net/u/4489090/blog/3223383

WPF使用Animation仿WeChat(微信)播放语音消息

允我心安 提交于 2020-04-07 19:21:18
效果图预览 新建MyCustomControl类。 public class MyCustomControl : Control { private static Storyboard MyStory; private ObjectAnimationUsingKeyFrames MyAnimation; private List<BitmapImage> ImageList; private UIElement animation; public static readonly DependencyProperty DurationProperty = DependencyProperty.Register("Duration", typeof(TimeSpan), typeof(MyCustomControl), new PropertyMetadata(null)); /// <summary> /// 动画时间 /// </summary> public TimeSpan Duration { get { return (TimeSpan)GetValue(DurationProperty); } set { SetValue(DurationProperty, value); } } public static readonly DependencyProperty

React - animate mount and unmount of a single component

拜拜、爱过 提交于 2020-04-07 10:48:12
问题 Something this simple should be easily accomplished, yet I'm pulling my hair out over how complicated it is. All I want to do is animate the mounting & unmounting of a React component, that's it. Here's what I've tried so far and why each solution won't work: ReactCSSTransitionGroup - I'm not using CSS classes at all, it's all JS styles, so this won't work. ReactTransitionGroup - This lower level API is great, but it requires you to use a callback when the animation is complete, so just using

CSS3动画积累+动画库+3d动画

China☆狼群 提交于 2020-04-07 09:35:08
一、animates.css animate.css是来自dropbox的工程师Daniel Eden开发的一款CSS3的动画效果小类库。包含了60多款不同类型的CSS3动画,包括:晃动,闪动,各种淡出淡出效果,如果你想快速的整合各种CSS3动画特效的话,使用它即可方便的实现。 查看演示: https://daneden.github.io/animate.css/ github地址: https://github.com/daneden/animate.css 二、magic.css动画库 查看演示: http://www.17sucai.com/pins/demoshow/10001 github地址: https://github.com/miniMAC/magic 三、Effect.css 针对不同UI的CSS3动画和过渡效果集,包含了丰富的CSS3动画和过渡效果,包括: Modal overlay button list listscroll Caption 等等 查看演示: http://www.gbtags.com/gb/linkviewer/3147.htm 四、hover.css Hover.css是一套使用CSS3动画实现的Hover特效集锦,包含了: 2D变形 边框过渡效果 阴影过渡效果 页脚翻转效果 查看演示: http://ianlunn.github

iOS动画详解(学习动画看这一篇就够了)

£可爱£侵袭症+ 提交于 2020-04-07 06:41:58
原文出处: wu大维 动效设计一直是iOS平台的优势,良好的动效设计可以很好地提升用户体验。而动画则是动效的基础支撑。本动画将从易到难逐步分析,从CABasicAnimation,UIBezierPath,CAShapeLayer三个方面完整的阐述iOS动画的实现。最终的效果如下: 例子来源与网络,不是我写的,我只是加上了详细的注释,方便大家理解(我只是代码的搬运工...)。这个例子是CABasicAnimation,UIBezierPath,CAShapeLayer的综合实现,如果能完全理解这个例子,相信其它的iOS动画也难不倒你了。 demo下载地址 CABasicAnimation 一、概念 这个部分你需要了解以下概念: CALayer、CAAnimation、CAAnimationGroup 1、CALayer CALayer是个与UIView很类似的概念,同样有backgroundColor、frame等相似的属性,我们可以将UIView看做一种特殊的CALayer。但实际上UIView是对CALayer封装,在CALayer的基础上再添加交互功能。UIView的显示必须依赖于CALayer。我们同样可以跟新建view一样新建一个layer,然后添加到某个已有的layer上,同样可以对layer调整大小、位置、透明度等。一般来说,layer可以有两种用途

css 动画 transition和animation

喜欢而已 提交于 2020-04-06 17:34:48
本文参考: http://www.ruanyifeng.com/blog/2014/02/css_transition_and_animation.html 1. transition基本用法:    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body, html { height: 100%; width: 100%; padding: 0; margin: 0; } img { width: 50px; height: 50px; display: block; margin: auto; transition: 1s; //如果不使用 transition 鼠标移到img 上面时是马上变化的,加上这个属性,变化就会持续一秒的过程 } img:hover { width: 500px; height: 500px; } </style> </head> <body> <img src="./o_200404110308weixin_20191025171935.jpg" alt=""

flutter 列表

眉间皱痕 提交于 2020-04-06 09:20:05
import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; void main() { runApp(new AnimatedListSample()); } class AnimatedListSample extends StatefulWidget { @override _AnimatedListSampleState createState() => new _AnimatedListSampleState(); } class _AnimatedListSampleState extends State<AnimatedListSample> { final GlobalKey<AnimatedListState> _listKey = new GlobalKey<AnimatedListState>(); ListModel<int> _list; int _selectedItem; int _nextItem; // The next item inserted when the user presses the '+' button. @override void initState() { super.initState(); _list = new

ios之CABasicAnimation

元气小坏坏 提交于 2020-04-04 22:31:44
博主:最近iOS开发中用到CoreAnimation的framework来做动画效果,虽然以前也用过,但一直没有系统学习过,今天看到一篇非常详细的博文(虽然是日语,但真的写的很好),在此翻译出来供大家学习。 原帖地址: http://www.objectivec-iphone.com/animation/CoreAnimation/CABasicAnimation.html 本文为博主翻译,若需转载,请注明出处: http://blog.csdn.net/iosevanhuang/article/details/14488239 CABasicAnimation类的使用方式就是基本的关键帧动画。 所谓关键帧动画,就是将Layer的属性作为KeyPath来注册,指定动画的起始帧和结束帧,然后自动计算和实现中间的过渡动画的一种动画方式。 CABasicAnimation的基本使用顺序 1.引用QuartzCore.framework 将"QuartzCore.framework"这个库添加到项目中。并且在需要使用CABaseAnimation类的地方import头文件。 [objc] view plain copy #import <QuartzCore/QuartzCore.h> 2.CABaseAnimation的实例化以及关键路径的注册 使用

iOS开发UI篇—核心动画简介

断了今生、忘了曾经 提交于 2020-04-04 21:03:00
一、简单介绍 Core Animation,中文翻译为核心动画,它是一组非常强大的动画处理API,使用它能做出非常炫丽的动画效果,而且往往是事半功倍。也就是说,使用少量的代码就可以实现非常强大的功能。 Core Animation是跨平台的,可以用在Mac OS X和iOS平台。 Core Animation的动画执行过程都是在后台操作的,不会阻塞主线程。不阻塞主线程,可以理解为在执行动画的时候还能点击(按钮)。 要注意的是,Core Animation是直接作用在CALayer上的,并非UIView。 二、Core Animation的使用步骤 1.使用它需要先添加QuartzCore.framework框架和引入主头文件<QuartzCore/QuartzCore.h>(iOS7不需要) 2.初始化一个CAAnimation对象,并设置一些动画相关属性 3.通过调用CALayer的addAnimation:forKey:方法增加CAAnimation对象到CALayer中,这样就能开始执行动画了 4.通过调用CALayer的removeAnimationForKey:方法可以停止CALayer中的动画 三、CAAnimation 类的继承结构图    CAAnimation是所有动画类的父类,但是它不能直接使用,应该使用它的子类。 常见属性有: duration:动画的持续时间

iOS开发UI篇—核心动画简介

时光总嘲笑我的痴心妄想 提交于 2020-04-04 20:52:26
iOS开发UI篇—核心动画简介 一、简单介绍 Core Animation,中文翻译为核心动画,它是一组非常强大的动画处理API,使用它能做出非常炫丽的动画效果,而且往往是事半功倍。也就是说,使用少量的代码就可以实现非常强大的功能。 Core Animation是跨平台的,可以用在Mac OS X和iOS平台。 Core Animation的动画执行过程都是在后台操作的,不会阻塞主线程。不阻塞主线程,可以理解为在执行动画的时候还能点击(按钮)。 要注意的是,Core Animation是直接作用在CALayer上的,并非UIView。 二、Core Animation的使用步骤 1.使用它需要先添加QuartzCore.framework框架和引入主头文件<QuartzCore/QuartzCore.h>(iOS7不需要) 2.初始化一个CAAnimation对象,并设置一些动画相关属性 3.通过调用CALayer的addAnimation:forKey:方法增加CAAnimation对象到CALayer中,这样就能开始执行动画了 4.通过调用CALayer的removeAnimationForKey:方法可以停止CALayer中的动画 三、CAAnimation 类的继承结构图    CAAnimation是所有动画类的父类,但是它不能直接使用,应该使用它的子类。 常见属性有: