UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

61 lines (52 loc) 1.36 kB
/*! * Module: swingOutToTop Animation * Usage: <div class="cssanimation ca__fx-swingOutToTop">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-swingOutToTop { animation-name: swingOutToTop; transform-origin: top center; transform-style: preserve-3d; perspective: 1000px; will-change: transform; } @keyframes swingOutToTop { from { transform: rotateX(0deg); transform-origin: top center; opacity: 1; } to { transform: rotateX(90deg); transform-origin: top center; opacity: 0; } }