Open In App

How to create a Smooth Transition on hover using CSS ?

Creating a smooth transition on hover in CSS involves using the transition property to define the property being animated and the duration of the transition. This effect is commonly used to make changes to an element’s appearance smooth and visually appealing when a user hovers over it.

Syntax:

/* Example of creating a smooth transition on hover */
.element {
transition: [property] [duration] [timing-function] [delay];
}

.element:hover {
/* Styles to apply on hover */
[property]: [new-value];
}

Features:

Article Tags :