Skip to content

Instantly share code, notes, and snippets.

@DanWahlin
Created December 22, 2013 01:25
Show Gist options
  • Save DanWahlin/8077397 to your computer and use it in GitHub Desktop.
Save DanWahlin/8077397 to your computer and use it in GitHub Desktop.
Sample AngularJS animations.
.slide-animation.ng-enter, .slide-animation.ng-leave {
-webkit-transition: 0.5s linear all;
-moz-transition: 0.5s linear all;
-o-transition: 0.5s linear all;
transition: 0.5s linear all;
position:relative;
height: 1000px;
}
.slide-animation.ng-enter {
z-index:100;
left:100px;
opacity:0;
}
.slide-animation.ng-enter.ng-enter-active {
left:0;
opacity:1;
}
.slide-animation.ng-leave {
z-index:101;
opacity:1;
left:0;
}
.slide-animation.ng-leave.ng-leave-active {
left:-100px;
opacity:0;
}
.repeat-animation.ng-enter,
.repeat-animation.ng-leave,
.repeat-animation.ng-move {
-webkit-transition: 0.5s linear all;
-moz-transition: 0.5s linear all;
-o-transition: 0.5s linear all;
transition: 0.5s linear all;
position:relative;
}
.repeat-animation.ng-enter {
left:10px;
opacity:0;
}
.repeat-animation.ng-enter.ng-enter-active {
left:0;
opacity:1;
}
.repeat-animation.ng-leave {
left:10px;
opacity:1;
}
.repeat-animation.ng-leave.ng-leave-active {
left:-10px;
opacity:0;
}
.repeat-animation.ng-move {
opacity:0.5;
}
.repeat-animation.ng-move.ng-move-active {
opacity:1;
}
@kimaina
Copy link

kimaina commented Sep 3, 2015

nice work helped me a lot

@dodgeviper
Copy link

Thanks a lot really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment