CSS CSS Transitions and Transforms Adding 3D Effects with CSS Build a Rotating 3D Cube

Amandeep Pasricha
Amandeep Pasricha
Front End Web Development Techdegree Student 11,540 Points

Why did he apply the transition to the .photo-cube class as opposed to the .cube-container class?

I'm confused as to which classes you apply the transitions to and how do you know?

1 Answer

Steven Parker
Steven Parker
170,451 Points

The "cube container" provides the perspective context, but the "photo cube" serves as the model of the cube itself and performs the rotation.

You might think of the "cube container" as a window into a 3-D environment and the "photo cube" as the object you are seeing in it.