Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Let's use CSS transitions and 3D transforms to make the photo gallery look 3D! In this video, you're going to create a 3D flip animation. You'll also learn a new property that gives you control over the behavior of nested elements in 3D space.
Resources
- Using CSS 3D transforms
- transform-style – MDN
- transform-style – WebKit demo
- backface-visibility – MDN
- cubic-bezier – WPD
Video review
- The 3D space you set applies to the direct children only.
- Other deeply nested elements will not live in the same 3D space, so they'll behave like 2D elements.
- For nested elements to behave like elements in 3D space, pass the 3D space down to them, using
transform-style
. -
transform-style: preserve-3d;
indicates that the children of the element should be positioned in the 3D space. - By default, the backside of an element is visible when facing the viewer.
- When elements are in 3D space, you can use
backface-visibility
to control whether or not you see an element's backside. -
backface-visibility: hidden;
hides the backside of a 3D-transformed element.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up