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 CSS Transitions and Transforms Adding 3D Effects with CSS Create a Flipping Animation with 3D Transform Properties

perspective and nested elements

Why did the video say that perspective only affects direct children but photo class wasn't a direct child and it still looked 3d?

I have the same question.

1 Answer

Soleil Walker
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Soleil Walker
UX Design Techdegree Graduate 18,955 Points

This was made possible by adding the "transform-style" property to the .photo class. This property allows us to apply and preserve the 3D spacing rule to those deeply nested elements. The property has two common values: 1) flat , and 2) preserve-3d. So in this case, the "preserve-3d" value was applied.