How would I create the following animation in svelte?
what I am trying to do:I have a two div elements. When I click on a button, firs div element fades out while the second div element fades in. Both the div elements are at the same position. So it looks like when one is fading out, the other card is fading in to take its place.Example: https://playcode.io/2226396
What I have already tried:Demo here: https://www.sveltelab.dev/u09gz5ytcs9rl7i
As you can see in the demo, the other card fades in but it is below the first card, and as the first card disappears it snaps in to its place.