Problem Statement
Explain how you can add a smooth hover effect using transition.
Explanation
You can define a `transition` on the property you want to animate, such as color or transform. Then when the property changes (like on hover), it transitions smoothly over the defined duration and easing. Example: `.btn { transition: background 0.3s ease; } .btn:hover { background: #007BFF; }`.
Code Solution
SolutionRead Only
.btn { transition: background 0.3s ease; } .btn:hover { background:#007BFF; }Practice Sets
This question appears in the following practice sets:
