@hellouxpavel/cssanimation
Version:
A Powerful CSS Animation Library for Advanced Motion Design.
105 lines (85 loc) • 2.15 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: Hang And Drop
* Filename: ca__HangAndDrop.ca__fx-css
*/
.ca__fx-hangAndDropLeft {
animation-name: hangAndDropLeft;
transform-origin: left;
backface-visibility: var(--cssanimation-backface-visibility);
transform-style: var(--cssanimation-transform-style);
will-change: var(--cssanimation-will-change);
}
@keyframes hangAndDropLeft {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(100deg);
}
60% {
transform: rotate(90deg);
opacity: 1;
}
90% {
opacity: 0.ca__fx-4;
filter: blur(2px);
}
100% {
transform: translateY(600%) rotate(120deg) scale(0.ca__fx-95);
opacity: 0;
}
}
.ca__fx-hangAndDropRight {
animation-name: hangAndDropRight;
transform-origin: right;
backface-visibility: var(--cssanimation-backface-visibility);
transform-style: var(--cssanimation-transform-style);
will-change: var(--cssanimation-will-change);
}
@keyframes hangAndDropRight {
0% {
transform: rotate(0);
}
50% {
transform: rotate(-100deg);
}
60% {
transform: rotate(-90deg);
opacity: 1;
}
90% {
opacity: 0.ca__fx-4;
filter: blur(2px);
}
100% {
transform: translateY(600%) rotate(-120deg) scale(0.ca__fx-95);
opacity: 0;
}
}