Peppa-pig
KPCKevin Powell - Community
•Created by Peppa-pig on 2/6/2025 in #front-end
Failing to animate(using transition) something from display none to block on hover
So this is some very simple code I have to replicate the problem I am having in my main project:
So I then import it in my main component. The problem occurs here is that this animates when I click the button to add it, but disappears without animating. When I add opacity: 0; to "test" and opacity:1 to "active", the opposite occurs. But none that animates both ways. I am aware that there are easier solutions(with keyframes, or using visibility), but I want to know why this doesnt work.
22 replies