CSS · Exercise 1 of 5Next
Beginner
A smooth hover
The button changes colour on hover, but the change is instant. Make the background colour glide over a duration between 0.1s and 0.5s.
It must glide both ways: when the mouse arrives and when it leaves.
What Check tests
- The button's normal state transitions its background
- The duration is between 0.1s and 0.5s
- Hovering still changes the colour
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.