UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

68 lines (57 loc) 1.49 kB
/*! * Module: kiteCollapse Animation * Usage: <div class="cssanimation ca__fx-kiteCollapse">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) !important; } @media (prefers-reduced-motion: reduce) { .cssanimation, .cssanimation span { animation: none !important; transition: none !important; } } /* stylelint-enable */ .ca__fx-kiteCollapse { animation-name: kiteCollapse; transform-origin: top center; animation-timing-function: ease-in; will-change: transform, opacity; } @keyframes kiteCollapse { 0% { transform: rotate(0deg) translateY(0%); opacity: 1; } 30% { transform: rotate(20deg) translateY(20%); opacity: 1; } 60% { transform: rotate(-60deg) translateY(60%) scale(0.8); opacity: 0.5; } 100% { transform: rotate(90deg) translateY(120%) scale(0.5); opacity: 0; } }