@hellouxpavel/cssanimation
Version:
A Powerful CSS Animation Library for Advanced Motion Design.
155 lines (123 loc) • 2.46 kB
CSS
.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 ;
}
}
: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;
}
/**
* Module: Bounce Out
* Filename: ca__BounceOut.ca__fx-css
*/
.ca__fx-bounceOutTop {
animation-name: bounceOutTop;
}
@keyframes bounceOutTop {
18%,
33%,
48% {
opacity: 1;
}
18% {
transform: translate3d(0, 27px, 0);
}
33% {
transform: translate3d(0, -12px, 0);
}
48% {
transform: translate3d(0, 8px, 0);
}
100% {
opacity: 0;
transform: translate3d(0, -300%, 0);
}
}
.ca__fx-bounceOutBottom {
animation-name: bounceOutBottom;
}
@keyframes bounceOutBottom {
18%,
33%,
48% {
opacity: 1;
}
18% {
transform: translate3d(0, -27px, 0);
}
33% {
transform: translate3d(0, 12px, 0);
}
48% {
transform: translate3d(0, -8px, 0);
}
100% {
opacity: 0;
transform: translate3d(0, 300%, 0);
}
}
.ca__fx-bounceOutLeft {
animation-name: bounceOutLeft;
}
@keyframes bounceOutLeft {
18%,
33%,
48% {
opacity: 1;
}
18% {
transform: translate3d(27px, 0, 0);
}
33% {
transform: translate3d(-12px, 0, 0);
}
48% {
transform: translate3d(8px, 0, 0);
}
100% {
opacity: 0;
transform: translate3d(-300%, 0, 0);
}
}
.ca__fx-bounceOutRight {
animation-name: bounceOutRight;
}
@keyframes bounceOutRight {
18%,
33%,
48% {
opacity: 1;
}
18% {
transform: translate3d(-27px, 0, 0);
}
33% {
transform: translate3d(12px, 0, 0);
}
48% {
transform: translate3d(-8px, 0, 0);
}
100% {
opacity: 0;
transform: translate3d(300%, 0, 0);
}
}