demo css to prevent jerking between change of states