Design comparison
SolutionDesign
Solution retrospective
I was facing a challenge restricting the TRANSITION only to the hover state without affecting the active state. Any Recommendation?.
Community feedback
- @atmahanaPosted about 1 year ago
Hello there. To set different transition behaviour for different states, you can set its own transition property. See the following 👇
button:hover { background-color: hsla(224, 30%, 27%, 0.5); transition: background-color .4s ease-in-out; } button:active { background-color: red; transition: background-color .1s ease-in-out; }
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord