UNPKG

@hellouxpavel/cssanimation

Version:

A Powerful CSS Animation Library for Advanced Motion Design.

70 lines (59 loc) 1.7 kB
/*! * Module: blobJumpMorph Animation * Usage: <div class="cssanimation ca__fx-blobJumpMorph">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-blobJumpMorph { width: 100px; height: 100px; background: radial-gradient(circle at 50% 50%, #00f0ff, #0099cc); border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; animation: blobJumpMorph 2.2s ease-in-out infinite; } @keyframes blobJumpMorph { 0%, 100% { transform: translateY(0) scale(1); border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; } 25% { transform: translateY(-30%) scale(1.1, 0.9); border-radius: 50% 40% 60% 50% / 40% 60% 40% 60%; } 50% { transform: translateY(0) scale(0.95, 1.05); border-radius: 60% 50% 40% 60% / 50% 60% 50% 40%; } 75% { transform: translateY(-15%) scale(1.05, 0.95); border-radius: 45% 55% 55% 45% / 55% 45% 55% 45%; } }