首页 > 其他 > 详细

angular动画

时间:2017-07-06 17:38:14      阅读:237      评论:0      收藏:0      [点我收藏+]

angularJs的动画是基于 angular-animate.js

这里是源码链接

它的基本原理是利用css的动画。transition。

方法是添加类名

技术分享

以上图片截自菜鸟教程,注意看类名

技术分享

这是点击动画效果实现后的表情。

我们在看css样式

div {
  transition: all linear 0.5s;
  background-color: lightblue;
  height: 100px;
  width: 100%;
  position: relative;
  top: 0;
  left: 0;
}

.ng-hide {
  height: 0;
  width: 0;
  background-color: transparent;
  top:-200px;
  left: 200px;
}
div {
  transition: all linear 0.5s;
  background-color: lightblue;
  height: 100px;
  width: 100%;
  position: relative;
  top: 0;
  left: 0;
}

.ng-hide {
  height: 0;
  width: 0;
  background-color: transparent;
  top:-200px;
  left: 200px;
}
transition: all linear 0.5s;

这就是angular的动画

 

angular动画

原文:http://www.cnblogs.com/UniverseWang/p/7127197.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!