From the course: Interactive Animations with CSS and JavaScript

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Control animations with classes

Control animations with classes

From the course: Interactive Animations with CSS and JavaScript

Start my 1-month free trial

Control animations with classes

- [Instructor] So now we have an auto-advance function in place. Let's go ahead and look at our mockup again and see where we stand with that. So we have our circle emphasized and we de-emphasized everything else. The next thing that's gonna have to happen is we're gonna translate from this chooser view to where we isolate the circle by itself and move it to the center and we show our new captions "How did you know?" And as you recall, I'm gonna refresh here and play what we have. After 3500 milliseconds or 3.5 seconds, it's going to go to the next slide, which is gonna repeat the animation. So first we're gonna fix this issue. Let's go back into the code, and first let's change our label to say "How did you know?" So we'll know when we've gone to the next slide. Save that off. The way we're gonna fix this animation issue is currently we only have one set of styles for the chosen and unchosen elements. We're going to separate the animation styles from the chosen/unchosen formatting…

Contents