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 Unused CSS Stages CSS Animations Full-Page Animation Project: Part 3

Tobiasz Gala
Tobiasz Gala
Full Stack JavaScript Techdegree Student 23,529 Points

Full-Page Animation Question

I was watching the full-page animation videos and downloaded project files. On full screen it looks good but when I shrink a window of my browser the background image plays reverse (in different direction than on full screen). Why it happens? I'm also using Chrome on Windows.It also shows frog image when i make smaller window even when the frog has negative position value. I just wonder why it looks good in full windows and why it behaves differently when I make it smaller.

2 Answers

Ben Attenborough
.a{fill-rule:evenodd;}techdegree seal-36
Ben Attenborough
Front End Web Development Techdegree Graduate 32,769 Points

I noticed that the animation runs slowly on a narrow viewport and indeed on a very narrow viewport it runs in reverse. I believe this is because pixel values have been used rather than percentages. This means the browser is making different calculations on how to move the background based on pixels rather than percentages. It means the finished design is not responsive.

However I'm not sure what percentage values you could use to correct this problem.

Ben is right, the units used are not responsive. The viewport needs to be at least 1020px wide to hide Mike the Frog and have the correct direction.