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

Appear on scroll or load with css

Is it possible to make content appear on load or scrolling a page with css? If so aby tutorials/articles would be greatly appreciated. Thanks guys and happy new year to you all lovely treehouse members

2 Answers

I'm not sure if you can do this with pure CSS (I assume you can't), but you can definitely change stuff on the page load and on scrolling event using JavaScript (jQuery will probably make it easier than pure JS). In jQuery, $( document ).ready() would be the one that does stuff as soon as the page loads and .scroll() would be the event handler for scrolling.

http://learn.jquery.com/using-jquery-core/document-ready/ http://api.jquery.com/scroll/

Hey Kelvin,

I've looked in the past, but haven't found a pure css way of doing this.

I have a link that might interest you though Superscrollorama.

Hope this helps.