59 lines
1.1 KiB
CSS
59 lines
1.1 KiB
CSS
.wrapper {
|
|
width: 300px;
|
|
height: 100px;
|
|
display: block;
|
|
}
|
|
|
|
.shelf {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
perspective: 400px; /* determines size of the overall element in the final transform */
|
|
backface-visibility: visible;
|
|
transform-style: preserve-3d;
|
|
perspective-origin: 50% 40%;
|
|
}
|
|
|
|
.face {
|
|
width: 300px;
|
|
height: 100px;
|
|
display: block;
|
|
position: absolute;
|
|
}
|
|
|
|
.small-face {
|
|
width: 100px;
|
|
height: 100px;
|
|
display: block;
|
|
position: absolute;
|
|
}
|
|
.top-shelf {
|
|
background-color: #DAA06D;
|
|
transform: rotateX(90deg) translateZ(50px);
|
|
}
|
|
|
|
.bottom-shelf {
|
|
background-color: #DAA06D;
|
|
transform: rotateX(-90deg) translateZ(50px);
|
|
}
|
|
|
|
.right-shelf {
|
|
background-color: #6F4E37;
|
|
transform: rotateY(90deg) translateZ(50px);
|
|
right: 0;
|
|
}
|
|
|
|
.left-shelf {
|
|
background-color: #6F4E37;
|
|
transform: rotateY(-90deg) translateZ(50px);
|
|
}
|
|
|
|
.front-shelf {
|
|
background: rgba(255,255,255,0.1);
|
|
transform: translateZ(50px);
|
|
}
|
|
|
|
.back-shelf {
|
|
background: #6E260E;
|
|
transform: rotateY(180deg) translateZ(50px);
|
|
} |