Transitions in CSS
Transitions allow you to animate changes in CSS properties over a specified duration. To use transitions, you need to specify the property you want to transition and the duration of the transition. Example:
css
button {
background-color: blue;
transition: background-color 0.5s;
}
button:hover {
background-color: red;
}
This will cause the button's background color to transition from blue to red over 0.5 seconds when the user hovers over it.
No comments:
Post a Comment