Reputation: 439
I'm currently playing around with CSS3 animations and would like to see what the possibilities are.
So I currently have an infinite animation cycle that works perfectly but I was wondering if it is possible to change the @keyframes when a link is selected.
So what I was thinking about:
-There is a animation running
-There are 3 links
-I have a set of 3 @keyframes
-When a link is selected the @keyframes change to another set of @keyframes
-This to be done without refreshing the page.
Maybe it is a very foolish and stupid question but as I was saying I'm trying to find out what the possibilities are.
Upvotes: 0
Views: 40
Reputation: 9329
You could easily have a CSS class which animates using keyframes 1, then have another class that uses keyframes 2.
You could then use JavaScript / jQuery to add and remove the different classes.
Upvotes: 1