Initialize CSS transition for each axis