Answer the question
In order to leave comments, you need to log in
How to make animation on loss of focus?
There is the following construction: sandbox
With hover
div , the submenu changes from to and the animation is triggered:display: none;
display: block;
animation: slide-top 0.3s ease-in-out both;
@keyframes slide-top {
0% {
transform: translateY(30px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
Answer the question
In order to leave comments, you need to log in
With display: none; you will not do reverse animation, but with visibility: hidden; and transition is easy to repeat:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question