Cube
15 hours ago in HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Static Cube</title>
<style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #1a1a1a;
overflow: hidden;
font-family: Arial, sans-serif;
color: white;
text-align: center;
}
h1 {
margin-bottom: 20px;
}
.scene {
width: 200px;
height: 200px;
perspective: 800px;
}
.cube {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transform: rotateX(30deg) rotateY(30deg);
}
.cube div {
position: absolute;
width: 200px;
height: 200px;
background: #6a0dad;
border: 1px solid #32cd32;
}
.front { transform: rotateY( 0deg) translateZ(100px); }
.back { transform: rotateY(180deg) translateZ(100px); }
.right { transform: rotateY( 90deg) translateZ(100px); }
.left { transform: rotateY(-90deg) translateZ(100px); }
.top { transform: rotateX( 90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }
</style>
</head>
<body>
<div>
<h1>Cube</h1>
<div class="scene">
<div class="cube">
<div class="front"></div>
<div class="back"></div>
<div class="right"></div>
<div class="left"></div>
<div class="top"></div>
<div class="bottom"></div>
</div>
</div>
</div>
</body>
</html>