UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

63 lines (53 loc) 1.37 kB
/*! * Module: layerPeelIn Animation * Usage: <div class="cssanimation ca__fx-layerPeelIn">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-layerPeelIn { animation-name: layerPeelIn; animation-timing-function: ease-out; transform-origin: top left; will-change: transform, opacity; perspective: 800px; } @keyframes layerPeelIn { 0% { transform: rotateX(-90deg) translateY(-100%); opacity: 0; } 60% { transform: rotateX(20deg); opacity: 1; } 100% { transform: rotateX(0deg) translateY(0%); } }