UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

69 lines (60 loc) 1.67 kB
/*! * Module: leafFloatAway Animation * Usage: <div class="cssanimation ca__fx-leafFloatAway">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-leafFloatAway { animation-name: leafFloatAway; animation-timing-function: ease-in-out; transform-origin: center; will-change: transform, opacity; } @keyframes leafFloatAway { 0% { transform: translateX(0%) rotate(0deg) scale(1); opacity: 1; } 100% { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; } } /** * Module: Perspective * Filename: ca__Perspective.css */ .ca__fx-perspectiveToTop { animation-name: perspectiveToTop; transform: perspective(500px); backface-visibility: var(--cssanimation-backface-visibility); transform-style: var(--cssanimation-transform-style); will-change: var(--cssanimation-will-change); }