@hellouxpavel/cssanimation
Version:
A Powerful CSS Animation Library for Advanced Motion Design.
61 lines (51 loc) • 1.41 kB
CSS
/*!
* Module: flipTwistPop Animation
* Usage: <div class="cssanimation ca__fx-flipTwistPop">Your Content</div>
*/
/* stylelint-disable */
:root {
--cssanimation-duration: 1s;
--cssanimation-fill-mode: both;
--cssanimation-infinite: infinite;
--cssanimation-backface-visibility: hidden;
--cssanimation-transform-style: preserve-3d;
--cssanimation-will-change: transform, opacity;
--cssanimation-display: inline-block;
--move-distance: -800px;
}
.cssanimation {
animation-duration: var(--cssanimation-duration, 1s);
animation-fill-mode: var(--cssanimation-fill-mode, both);
}
.cssanimation span {
display: var(--cssanimation-display, inline-block);
}
.infinite {
animation-iteration-count: var(--cssanimation-infinite, infinite) ;
}
@media (prefers-reduced-motion: reduce) {
.cssanimation,
.cssanimation span {
animation: none ;
transition: none ;
}
}
/* stylelint-enable */
.ca__fx-flipTwistPop {
animation-name: flipTwistPop;
transform-origin: center;
will-change: transform, opacity;
}
@keyframes flipTwistPop {
0% {
transform: perspective(600px) rotateY(60deg) rotateZ(-10deg) scale(0.8);
opacity: 0;
}
60% {
transform: perspective(600px) rotateY(-10deg) rotateZ(5deg) scale(1.05);
opacity: 1;
}
100% {
transform: perspective(600px) rotateY(0deg) rotateZ(0deg) scale(1);
}
}