Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Iannish Posooa
PLUS
Iannish Posooa
Courses Plus Student 2,392 Points

Is there any way in CSS that I can control an animation by using scroll?

Basically I want to have an animation play while the person scrolls down my page.

  1. This includes animations that are triggered when they reach a certain anchor/div.

  2. An animation timeline that can be scrubbed back and forth by scrolling up or down on my page

1 Answer

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

I'm pretty sure you're going to need to use JavaScript to accomplish that. Having ananimation trigger by scrolling requires knowing an elements coordinates on the page, so you'll either need to roll your own JavaScript/jQuery or find a library/plugin that can do it for you.

Iannish Posooa
Iannish Posooa
Courses Plus Student 2,392 Points

Thanks Ryan,

Do you have any resources or treehouse courses that you would recommend. I am currently on the front end track and about to start JQuery basics.

Thanks,