CSS transition between left -> right and top -> bottom positions
Is it possible to use CSS transitions to animate something between a position set as left: 0px to right: 0px so it goes all the way across the screen? I need to accomplish the same thing with top to bottom. Am I stuck calculating the screen width / object-size? #nav { position: absolute; top: 0px; left: 0px; width: 50px; height: 50px; -webkit-transition: all 0.5s ease-out; } .moveto { top: 0px; right: 0px; } and then I use jQuery's .addClass methodofaction If you know the width/height of the animated element you can animate the position (top, bottom, left, right) and then substract the