Animation Duration and Delay
📖 Scenario: You are creating a simple webpage with a colored box that moves across the screen. You want to control how long the animation takes and when it starts.
🎯 Goal: Build a webpage with a blue square that slides from left to right. Use CSS to set the animation duration to 3 seconds and add a delay of 2 seconds before the animation starts.
📋 What You'll Learn
Create a blue square box using HTML and CSS
Define a CSS animation that moves the box horizontally
Set the animation duration to exactly 3 seconds
Add an animation delay of exactly 2 seconds
Ensure the animation runs only once and stays at the end position
💡 Why This Matters
🌍 Real World
Animations like this are used in websites to draw attention to important elements or to create smooth transitions.
💼 Career
Understanding animation timing helps front-end developers create engaging user interfaces that feel responsive and polished.
Progress0 / 4 steps