CSS Animations & Keyframes
Learn how to create smooth CSS animations using @keyframes. From simple transitions to complex multi-step animations.
Keyframe Animations
Define animation sequences with @keyframes:
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.element {
animation: fadeIn 1s ease-in-out;
}Animation Properties
animation-nameKeyframe nameanimation-durationDurationanimation-timing-functionTiming functionanimation-delayDelayanimation-iteration-countIteration countanimation-directionDirectionanimation-fill-modeFill modeanimation-play-statePlay stateTiming Functions
easeFast-slow
ease-inSlow start
ease-outSlow end
linearConstant
Common Animation Examples
Bounce
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}Pulse
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.1); }
}Rotate
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}Related Tool
Animation Generator
Visually generate animation effects