Interview Question

What is animation in CSS?

CSS animation plays a named sequence of keyframes.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

CSS animations apply keyframed property values over time. • An animation references a named @keyframes rule. • Duration, timing, iteration, direction, fill mode, and delay control playback. • Animations should avoid hiding essential content or causing harmful motion.

💡 Simple Example

.spinner { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(1turn); } }

⚡ Quick Revision

CSS animation plays a named sequence of keyframes.