Skip to content

Instantly share code, notes, and snippets.

@dac09
Last active March 13, 2018 18:02
Show Gist options
  • Save dac09/b80d1510e04c3821e4468852dd0732b0 to your computer and use it in GitHub Desktop.
Save dac09/b80d1510e04c3821e4468852dd0732b0 to your computer and use it in GitHub Desktop.
Slide in from left, slight off to right | CSSTransitionGroup
.floatUp-enter {
opacity: 0.1;
transform: translate3d(0, 30%, 0);
}
.floatUp-enter.floatUp-enter-active {
opacity: 1;
transform: translate3d(0, 0, 0);
transition: all ease-in-out 400ms;
}
.floatUp-exit {
opacity: 0;
}
.floatUp-exit.floatUp-exit-active {
transform: translate3d(0, 30%, 0);
opacity: 0;
transition: all ease-out 300ms;
}
.slide-enter {
opacity: 0.1;
transform: translateX(30%);
}
.slide-enter.slide-enter-active {
opacity: 1;
transform: translateX(0);
transition: all ease-in-out 400ms;
}
.slide-exit {
position: fixed;
opacity: 1;
}
.slide-exit.slide-exit-active {
transform: translateX(-30%);
opacity: 0;
transition: all ease-out 300ms;
}
@dac09
Copy link
Author

dac09 commented Mar 13, 2018

translate3d is probably better

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