CSS Transitions allow you to change property values smoothly, over a given duration. It is commonly used for interactive elements like hover effects on buttons.
To create a transition, you must specify two things: 1) the CSS property you want to add an effect to, and 2) the duration of the effect.
width, background-color, or all).0.3s).linear, ease, ease-in-out).You can define all of these in a single line using the transition property.
.button {
transition: background-color 0.5s ease-in 0.1s;
}
0.2s and 0.4s feels the most natural and responsive to users.