UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

103 lines (83 loc) 1.76 kB
.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; } } :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; } /** * Module: Spin From * Filename: ca__SpinFrom.ca__fx-css */ .ca__fx-spinFromLeft { animation-name: spinFromLeft; } @keyframes spinFromLeft { from, to { transform-origin: left bottom; } to { transform: rotate(90deg); opacity: 0; } } .ca__fx-spinFromRight { animation-name: spinFromRight; } @keyframes spinFromRight { from, to { transform-origin: right bottom; } to { transform: rotate(-90deg); opacity: 0; } } .ca__fx-spinFromTop { animation-name: spinFromTop; } @keyframes spinFromTop { from, to { transform-origin: left bottom; } to { transform: rotate(-90deg); opacity: 0; } } .ca__fx-spinFromBottom { animation-name: spinFromBottom; } @keyframes spinFromBottom { from, to { transform-origin: right bottom; } to { transform: rotate(90deg); opacity: 0; } }