use css transition for overlay