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 trialJohan Hernández
4,141 PointsTreehouse main page animatons
Hi, does someone know how are made the animations that happen when scroll down in Tree House main page. Was it made using adobe edge animation or something?
11 Answers
Chris Michel
3,020 PointsHey Johan, I'd be happy to share some insight into how those were created. I'm not sure how much detail you want, but this is the gist of how I built them.
• Each illustration is made of part image and part css elements.
• I setup containers using position: relative
to act as the parent for the animated elements that are position: absolute
• I then setup a class that held the final position for each element and set the default to something hidden or off canvas, using overflow: hidden
for things like the sliding app screens.
• From there I just setup a coffeescript file that calculates the window height on load so that I could add classes to the animated elements.
• The animation magic happens by using CSS transforms on the animated elements.
• In the coffeescript file, I also stored the scroll positions of each section and used a conditional to look for those so I could add the classes and time things out accordingly.
There are definitely other ways to get the same outcome, but this approach seemed easy and consistent for what we needed on the homepage animations.
Let me know if you want anymore details!
Chris Michel
3,020 PointsHmmmm, that might be doable. We'll see :)
Micah Elias
2,774 PointsThat page doesn't seem to exist. Can you update the link?
Johan Hernández
4,141 PointsIt does but you must be logged out to see it http://teamtreehouse.com
Tommy Morgan
Treehouse Guest TeacherI think Chris Michel is behind these, maybe he can shed some light on them :)
Anthony Hind
5,715 PointsIs this covered anywhere in the treehouse library or something similar it certainly appears to be the trend at the moment looks very cool as you scroll down the page I was looking at the Litmus Email testing tool https://litmus.com/ they also have a very cool example of this not sure if it is the same technologies but it looks cool too.
Johan Hernández
4,141 PointsThat one is good too Anthony! I would like to ask the same! Thank you Chris Michel it looks great!
Chris Michel
3,020 PointsThanks guys! I don't think we teach this technique currently, but could be something to think about!
Anthony Hind
5,715 PointsMaybe a detailed blog post for now ??? Hint hint ;)
Anthony Hind
5,715 PointsMaybe a detailed blog post for now ??? Hint hint ;)
Johan Hernández
4,141 PointsGreat I look forward to read it!