UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

103 lines (83 loc) 1.74 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 To * Filename: ca__SpinTo.ca__fx-css */ .ca__fx-spinToLeft { animation-name: spinToLeft; } @keyframes spinToLeft { from, to { transform-origin: left bottom; } from { transform: rotate(90deg); opacity: 0; } } .ca__fx-spinToRight { animation-name: spinToRight; } @keyframes spinToRight { from, to { transform-origin: right bottom; } from { transform: rotate(-90deg); opacity: 0; } } .ca__fx-spinToTop { animation-name: spinToTop; } @keyframes spinToTop { from, to { transform-origin: left bottom; } from { transform: rotate(-90deg); opacity: 0; } } .ca__fx-spinToBottom { animation-name: spinToBottom; } @keyframes spinToBottom { from, to { transform-origin: right bottom; } from { transform: rotate(90deg); opacity: 0; } }