Workshop › Traffic light › Step 10 of 12
To light them in turn, the yellow lamp starts its timeline 2 seconds later and the green one 4 seconds later.
```css
.lamp:nth-child(2) {
background: gold;
animation-delay: 2s;
}
.lamp:nth-child(3) {
background: limegreen;
animation-delay: 4s;
}
```animation-delay waits before starting the animation. 0, 2 and 4 seconds put the three lamps a third of a round apart.Add animation-delay to the yellow (2s) and green (4s) rules.
Skills: Styling with CSS
← Play the timeline One setting for the speed →