Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Unused CSS Stages CSS Animations Full-Page Animation Project: Part 3

Tobiasz Gala
seal-mask
.a{fill-rule:evenodd;}techdegree
Tobiasz Gala
Full Stack JavaScript Techdegree Student 23,517 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
seal-mask
.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.