let elements = Array.from(document.querySelectorAll("#example-3 .card"))
elements.forEach(el => el.classList.remove("hidden"))
await animateStack("enter", elements)
await new Promise(res => setTimeout(res, 2000))
await animateStack("leave", elements)
elements.forEach(el => el.classList.add("hidden"))
await new Promise(res => setTimeout(res, 500))
#example-3 .animate-enter-active, #example-3 .animate-leave-active {
transition: ease-out 0.5s all;
}
#example-3 .animate-enter-step,
#example-3 .animate-leave-step {
transition-delay: 100ms;
}
#example-3 .animate-enter-step:last-child {
transition-delay: 150ms;
}
#example-3 .animate-enter {
transform: translateY(50px);
opacity: 0;
}
#example-3 .animate-leave-end {
opacity: 0;
}
#example-3 .hidden {
opacity: 0;
}