Building Second Face of Cube

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 91:- Building Second Face of Cube

To build the second face of a 3D cube, you can add another div to represent the second face and position it using CSS transforms.

Here's an example of how to build the second face of a 3D cube:

cssCopy code

<div class="cube">  <div class="face front">Front</div>  <div class="face back">Back</div> </div> .cube {  width: 200px;  height: 200px;  perspective: 1000px; } .face {  width: 100%;  height: 100%;  position: absolute;  text-align: center;  font-size: 36px;  color: white; } .front {  transform: translateZ(100px);  background-color: red; } .back {  transform: rotateY(180deg) translateZ(100px);  background-color: blue; }

In this example, a cube is created using a container div and two divs representing the front and back faces of the cube. The faces are positioned using absolute positioning and the CSS transforms are used to rotate the back face in 3D space. The background color of each face is set to a different color to help distinguish the different faces of the cube.

You can add more faces to the cube by adding additional divs and positioning them using CSS transforms. For example, to add the left and right faces, you could add the following code:

cssCopy code

<div class="face left">Left</div> <div class="face right">Right</div> .left {  transform: rotateY(-90deg) translateZ(100px);  background-color: green; } .right {  transform: rotateY(90deg) translateZ(100px);  background-color: yellow; }

In this example, two additional divs representing the left and right faces of the cube are added. The CSS transforms are used to rotate the left and right faces in 3D space. The background color of each face is set to a different color to help distinguish the different faces of the cube.

11. Animations And 3d Space

2 Comments

@niteshguptav63
niteshguptav63 Nov 17, 2024 at 1:39 PM

I am not able to access videos from second class and further. I have already completed first class

@niteshguptav63
niteshguptav63 Nov 16, 2024 at 10:56 AM

When will I get my course?

@admin79
admin79 Nov 17, 2024 at 1:29 PM

Now, Your query was resolved.

Frequently Asked Questions About Sciaku Courses & Services

Quick answers to common questions about our courses, quizzes, and learning platform

Didn't find what you're looking for?

help_center Contact Support