After the sides are turned, we only see the front of the cube.
Well, the back, thanks to the transparency of the background.
To make all the sides visible, we need to add a perspective with a depth of 400px.
You need to add it at least once.
We also need to move inward each side.
The sides rotated about their middle and therefore we will move them by half the width of the side.

This task is part of the Full-Stack JavaScript Course .
If you have any issues with it, you can ask for community help below the post.
Feel free to help others if you’ve already solved the task.