UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

99 lines (79 loc) 1.83 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: Rotate In * Filename: ca__RotateIn.ca__fx-css */ .ca__fx-rotateInLeft { animation-name: rotateInLeft; } @keyframes rotateInLeft { from { opacity: 0; transform: translateX(-100%) rotate(0deg); } to { transform: translateX(0) rotate(360deg); } } .ca__fx-rotateInRight { animation-name: rotateInRight; } @keyframes rotateInRight { from { opacity: 0; transform: translateX(100%) rotate(0deg); } to { transform: translateX(0) rotate(-360deg); } } .ca__fx-rotateInTop { animation-name: rotateInTop; } @keyframes rotateInTop { from { opacity: 0; transform: translateY(-400%) rotate(0deg); } to { transform: translateX(0) rotate(360deg); } } .ca__fx-rotateInBottom { animation-name: rotateInBottom; } @keyframes rotateInBottom { from { opacity: 0; transform: translateY(400%) rotate(0deg); } to { transform: translateX(0) rotate(360deg); } }