fix css transition bugs on safari