I have a block that I want to animate the height to 0, and then the width to 0. Is there a way to do that with a CSS animation?
The catch is that I don't know what the starting height/width of the block is, so using
@keyframes shrink {
50% { height: 0; width: <UNKNOWN>; }
100% { width: 0 }
}
doesn't work.
The effect I'm going for is like this (using jQuery): http://jsfiddle.net/andrewburgess/LFjEv/