The right property is animatable in CSS.
Note: CSS Animations do not work in Internet Explorer 9 and earlier versions.
Gradually change the right position of the DIV element from 0, to 500px, and back to 0: