UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

62 lines (52 loc) 1.48 kB
/*! * Module: kiteFlipTwist Animation * Usage: <div class="cssanimation ca__fx-kiteFlipTwist">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-kiteFlipTwist { animation-name: kiteFlipTwist; transform-origin: center; animation-timing-function: ease-out; will-change: transform, opacity; } @keyframes kiteFlipTwist { 0% { transform: perspective(800px) rotateX(90deg) rotateZ(-45deg) translateY(-100%); opacity: 0; } 50% { transform: perspective(800px) rotateX(-30deg) rotateZ(10deg) translateY(10%); opacity: 1; } 100% { transform: perspective(800px) rotateX(0deg) rotateZ(0deg) translateY(0%); } }