🎬 CSS Animation Library

Pre-built CSS animations ready to copy and paste into your projects. Click play to preview, then copy the code!

Entrance Animations

Fade In

.fadeIn { animation: fadeIn 0.8s ease-in-out; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

Slide In Left

.slideInLeft { animation: slideInLeft 0.6s ease-out; } @keyframes slideInLeft { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

Slide In Right

.slideInRight { animation: slideInRight 0.6s ease-out; } @keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

Slide In Up

.slideInUp { animation: slideInUp 0.6s ease-out; } @keyframes slideInUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

Slide In Down

.slideInDown { animation: slideInDown 0.6s ease-out; } @keyframes slideInDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

Zoom In

.zoomIn { animation: zoomIn 0.5s ease-out; } @keyframes zoomIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

Exit Animations

Fade Out

.fadeOut { animation: fadeOut 0.6s ease-in-out; } @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

Slide Out Left

.slideOutLeft { animation: slideOutLeft 0.6s ease-in; } @keyframes slideOutLeft { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }

Slide Out Right

.slideOutRight { animation: slideOutRight 0.6s ease-in; } @keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

Zoom Out

.zoomOut { animation: zoomOut 0.5s ease-in; } @keyframes zoomOut { from { transform: scale(1); opacity: 1; } to { transform: scale(0); opacity: 0; } }

Attention Seekers

Bounce

.bounce { animation: bounce 1s ease-in-out infinite; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

Pulse

.pulse { animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

Shake

.shake { animation: shake 0.5s ease-in-out; } @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

Swing

.swing { animation: swing 1s ease-in-out; } @keyframes swing { 20% { transform: rotate(15deg); } 40% { transform: rotate(-10deg); } 60% { transform: rotate(5deg); } 80% { transform: rotate(-5deg); } 100% { transform: rotate(0deg); } }

Loading Animations

Rotate Spinner

.rotate { animation: rotate 2s linear infinite; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

Morph Spinner

.spinner { animation: spinner 1s linear infinite; } @keyframes spinner { 0% { transform: rotate(0deg); border-radius: 50%; } 50% { transform: rotate(180deg); border-radius: 5%; } 100% { transform: rotate(360deg); border-radius: 50%; } }

Pulsing Dots

.dots { animation: dots 1.4s infinite ease-in-out; } @keyframes dots { 0%, 80%, 100% { transform: scale(0); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

Progress Bar

.progress { animation: progress 2s ease-in-out infinite; } @keyframes progress { 0% { width: 0%; } 50% { width: 100%; } 100% { width: 0%; } }