Animating with Javascript
Animating interactive components
PROModule Outline
- Source Code & Resources PRO
- Lesson 1: Introduction PUBLIC
- Lesson 2: The Difference Between UI and UX PUBLIC
- Lesson 3: General Concepts PUBLIC
- Lesson 4: A Brief Introduction to Accessibility PRO
- Lesson 5: Navigation Concepts PRO
- Lesson 6: Actual Performance & Perceived Performance PRO
- Lesson 7: Controlling the Layout PRO
- Lesson 8: Utilising CSS Grid & Flexbox PRO
- Lesson 9: Creating a Layout That Adapts to Desktop PRO
- Lesson 10: CSS Variables and Syntactically Awesome Style Sheets (SASS) PRO
- Lesson 11: Improving Form UX PRO
- Lesson 12: Animating with CSS PRO
- Lesson 13: Animating with Angular PRO
- Lesson 14: Animating with Ionic and the Web Animations API PRO
- Lesson 15: Animating with Javascript PRO
- Lesson 16: Scalable Vector Graphics (SVG) PRO
- Lesson 17: Conclusion PRO
Lesson Outline
Animating with Javascript
In the previous lessons, we have covered creating animations using CSS keyframes, through using Angular animations, and through using Ionic animations. In this lesson we will be covering one more method for creating animations. Using Javascript, we can directly manipulate the properties of elements to create an animation effect. We can either create the illusion of animation by making small increments in quick succession, or we can make sudden changes to properties but have that change be animated through the use of the transition
CSS property.
This approach is generally useful for creating more complex effects in response to user input, for example creating a parallax effect when the content area is scrolled:
With the previous approaches, we defined a specific animation, and then played that animation at a particular point in time. This approach allows us to add more logic to our animations as they are playing.
The transition
property
We've briefly mentioned the transition
property in CSS and you will likely have used it in the past. This property allows you to animate the change of CSS properties, like going from full opacity to no opacity, or from one position to another.
Thanks for checking out the preview of this lesson!
You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).