how do i make sure that the webpage remains in the final state of the transition? like if a bix box turns from green to red on transition, i would like it to stay red. and not go back to green. How can this be done?
Asked
Active
Viewed 104 times
0
-
Basically, with pure CSS transitions you can't. Transitions rely on 'states' like 'hover' so as soon as that state no longer applies the transition reverses. What you really want to do, I suspect, is apply a different default state or class ...and that, essentially, relies on Javascript – Paulie_D Oct 12 '13 at 17:58
-
An alternative is a CSS keyframe animation which will start and end over a specific time. Which would be best for you will depend on what precisely it is you are trying to do. – Paulie_D Oct 12 '13 at 18:02
1 Answers
0
Change the class with jQuery and have a transition for the change this way the color will be changed in the html via the added class.

Community
- 1
- 1

Adam 'Sacki' Sackfield
- 594
- 1
- 4
- 19