@hellouxpavel/cssanimation
Version:
A Powerful CSS Animation Library for Advanced Motion Design.
55 lines (46 loc) • 1.23 kB
CSS
/*!
* Module: rollToRight Animation
* Usage: <div class="cssanimation ca__fx-rollToRight">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-rollToRight {
animation-name: rollToRight;
}
@keyframes rollToRight {
from {
transform: translateX(0) perspective(600px) rotateY(0deg);
opacity: 1;
}
to {
transform: translateX(100%) perspective(600px) rotateY(-180deg);
opacity: 0;
}
}