Implement transition animation.