slider to css animation fix