Skip to main content
CSS Code Completion Medium +20 XP

Transition Property

Complete to animate opacity on hover.

CSSFill in the blank
.btn { opacity: 1; ___: opacity 0.3s ease; }
.btn:hover { opacity: 0.7; }

Type the missing code

Show answer and explanation

Answer: transition

The transition property animates changes between states. Syntax: property duration timing-function.

Hint: Which property creates smooth state changes?

What this challenge tests

Code Completion in CSS: transitions, animation.

Related challenges