
Cool css cards animation - Menachem36
https://codepen.io/Menachem36/pen/wmPzRZ
======
anotheryou
what is cool about this? Animation is not smooth (big jump between views) and
code is not pretty either (css in js instead of classes for states)

~~~
Menachem36
How would you make the code prettier then? Pls put on codepen / git. I'd love
to see how you make the code more pretty. What do you mean by classes for
states? I had to use jquery bc of the functionality (toggle between states - I
wanted to do w/ classes but I had to use jquery). Looking forward to see the
prettier code!

~~~
anotheryou
Ah it's your code, sorry for being so harsh than :)

I'd only toggle a single class on the wrapper (or use hover if that's what you
are after. that's what I did to get away without js).

Animations work well with CSS, transform is fastest here.

Use alpha instead of the grey on the shadow and it stacks correctly.

[https://jsfiddle.net/s8kgmwL7/36/](https://jsfiddle.net/s8kgmwL7/36/)

You could probably do better than me for the stacking. Animating the margin is
not a good thing for performance.

edit: updated a bit

