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.

Targeted animations using IDs

Targeted animations using IDs

From the course: Interactive Animations with CSS and JavaScript

Start my 1-month free trial

Targeted animations using IDs

- [Instructor] So, referring back to our mock up let's see where we're at. We have our How did you know? slide, and then we want to fade the text out from that, and then we're gonna show the next one, Answer: you learned. So, let's go back to our editor and what we're gonna do is we're gonna copy this slide again, so this is the last slide in our list here. We're gonna paste it in, and I'm gonna shorten this animation a little bit. Let's make this only 1500 milliseconds, 1.5 seconds, and then it's gonna advance to this next slide, and this next slide we're going to have the text fadeout effect, and so the way I want to handle that is I'm going to add an id to this slide. I'm gonna say for this particular slide we're gonna have a special CSS rule that fades the text out, so I'm gonna call this, the id will be tfo, so text fadeout. I save that, and then let's go over to our CSS file. We'll come down here to the bottom. Now we're gonna write a special selector that's just gonna use that…

Contents