-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
50 lines (44 loc) · 1.37 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
perspective: 1000px;
background-color: #023047;
}
.container {
width: 200px;
height: 200px;
transform-style: preserve-3d;
animation: rotate 10s infinite linear;
}
.cube {
width: 100%;
height: 100%;
transform-style: preserve-3d;
position: relative;
}
.face {
position: absolute;
width: 150px;
height: 150px;
border: 2px solid black;
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
opacity: 0.9;
}
.front { transform: rotateY(0deg) translateZ(100px); background: cyan; opacity: 0.5; }
.back { transform: rotateY(180deg) translateZ(100px); background: cyan; opacity: 0.5; }
.right { transform: rotateY(90deg) translateZ(100px); background: cyan; opacity: 0.5; }
.left { transform: rotateY(-90deg) translateZ(100px); background: cyan; opacity: 0.5; }
.top { transform: rotateX(90deg) translateZ(100px); background: cyan; opacity: 0.5; }
.bottom { transform: rotateX(-90deg) translateZ(100px); background: cyan; opacity: 0.5; }
@keyframes rotate {
0%, 100% { transform: rotateY(0deg); }
25% { transform: rotateY(90deg); }
50% { transform: rotateY(180deg); }
75% { transform: rotateY(270deg); }
}