Coding task · HTML and CSS course · Module 6: CSS Animations
Pulse Animation in CSS
@keyframes is a way to define animation stages - from 0% to 100%. The 'pulse' animation uses scale() to make the element grow and shrink. The animation property takes: name, duration, timing function, iteration count. Example: animation: pulse 1s ease-in-out infinite;
Task
Create @keyframes pulse: 0% and 100% { transform: scale(1) }, 50% { transform: scale(1.2) }. Add to .scarab: animation: pulse 2s ease-in-out infinite. Result: the scarab smoothly pulses like a beating heart!