@hellouxpavel/cssanimation
Version:
A Powerful CSS Animation Library for Advanced Motion Design.
144 lines (117 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: Zoom In
* Filename: ca__ZoomIn.ca__fx-css
*/
.ca__fx-zoomIn {
animation-name: zoomIn;
}
@keyframes zoomIn {
from {
transform: scale(10);
opacity: 0;
}
}
.ca__fx-bounceZoomIn {
animation-name: bounceZoomIn;
}
@keyframes bounceZoomIn {
0%,
25%,
55%,
85%,
100% {
animation-timing-function: ease-out;
transform: scale(1);
}
41%,
44% {
animation-timing-function: ease-in;
transform: scale(1.ca__fx-5);
}
70% {
animation-timing-function: ease-in;
transform: scale(1.ca__fx-3);
}
90% {
transform: scale(1.ca__fx-1);
}
}
.ca__fx-zoomInLeft {
animation-name: zoomInLeft;
}
@keyframes zoomInLeft {
from {
transform: scale(10) translateX(-50%);
opacity: 0;
}
}
.ca__fx-zoomInRight {
animation-name: zoomInRight;
}
@keyframes zoomInRight {
from {
transform: scale(10) translateX(50%);
opacity: 0;
}
}
.ca__fx-zoomInTop {
animation-name: zoomInTop;
}
@keyframes zoomInTop {
from {
transform: scale(10) translateY(-50%);
opacity: 0;
}
}
.ca__fx-zoomInBottom {
animation-name: zoomInBottom;
}
@keyframes zoomInBottom {
from {
transform: scale(10) translateY(50%);
opacity: 0;
}
}
.ca__fx-snapZoom {
animation: snapZoom var(--duration, 1s) cubic-bezier(0.ca__fx-4, 1.ca__fx-8, 0.ca__fx-6, 1) both;
}
@keyframes snapZoom {
0% {
transform: scale(0.ca__fx-3);
opacity: 0;
}
50% {
transform: scale(1.ca__fx-15);
opacity: 1;
}
100% {
transform: scale(1);
}
}