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 CSS Transitions and Transforms Adding 3D Effects with CSS Build a Rotating 3D Cube

only the front image rotates

I have re-watched the video a few times, matched my code and (think) I checked my spelling thoroughly but my cube does not rotate. It looks like the pictures are about in place, although not perfectly aligned, but the only image that rotates is the .front one.

Here is my workspace: https://w.trhou.se/f7yvnpnter

1 Answer

Here it is transform-style: preserve-3d. You have transform.

.photo-cube {
  transition: transform 2s ease-in-out;
  width: 220px;
  height: 200px;
  transform-style: preserve-3d;