Lesson

Animate a Button on Hover with a CSS transform

In this lesson, we'll use the hover pseudo class to conditionally style a button when the mouse hovers on the button.

Duration
2 min
Access
Free
Transcript
Available

In this lesson, we'll use the hover pseudo class to conditionally style a button when the mouse hovers on the button.

In this case, we'll use the scale CSS transform to change a button size on hover. Then we will add a transition to the transform to make the animation more natural looking.