Problem Statement
Your hover animation is lagging on mobile. How would you fix it?
Explanation
Optimize by using hardware-accelerated properties like `transform` instead of `top` or `left`. Reduce repainting by avoiding box shadows and gradients. Consider `will-change: transform` and minimize animation duration for better mobile performance.
Code Solution
SolutionRead Only
.btn { transition: transform 0.3s; will-change: transform; }Practice Sets
This question appears in the following practice sets:
