add css animation to left and right