From the course: Interactive Animations with CSS and JavaScript

Unlock the full course today

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

The DOM is everything

The DOM is everything

From the course: Interactive Animations with CSS and JavaScript

Start my 1-month free trial

The DOM is everything

- [Instructor] So we have implemented our montage. We are now sitting on the last image that's going to be presented, which is a random image plus the tag. Now it's time to show our big finish. So let's go ahead and go to the end of the presentation. And the last slide I'd like to show is the words the end. But I want it to be handwritten and I want it to appear to have been drawn on the screen. We're gonna do that by animating an SVG image. And the most interesting thing about SVG is that SVG is actually an XML dialect. So it can participate in the DOM just like a regular page can. For example, you're probably pretty familiar with a DOM. For a given HTML page, it's got an HTML parent element. It's got head, body, title, et cetera. Well, what is interesting is that SVG also has tags and can have attributes and can participate just like HTML can. So let's go look for our particular image, it's a very simple DOM tree. We have an SVG root element and a bunch of paths. And the paths are…

Contents