Skip to main content
InterviewHubPRO
Section Overview
Q18

Question 18 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

36%
CSS3 & Modern Layouts (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

CSS Transitions vs. Keyframe Animations.

senior LevelSystem Design

In Simple Words:

  • Transitions (transition: transform 0.3s ease):
    • Animates property changes between two states triggered by user interaction (:hover, :focus, class toggle).
    • Implicit (A to B). Cannot loop infinitely without JavaScript.
  • Keyframe Animations (@keyframes slideIn { ... }):
    • Complex multi-step animations (0%, 25%, 50%, 100%).
    • Does not require a trigger; can start automatically on load, loop infinitely (infinite), alternate directions (alternate), and stay on final state (animation-fill-mode: forwards).