-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrotateCube-review.html
71 lines (69 loc) · 1.76 KB
/
rotateCube-review.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>rotateCube-review</title>
<style>
body{
background: #000000;
-webkit-perspective: 800px;
-webkit-perspective-origin: center 50px;
}
*{
padding: 0;
margin: 0;
}
#container{
height: 200px;
width: 200px;
margin: 200px auto;
-webkit-transform-style: preserve-3d;
-webkit-animation: rotate 2s ease infinite;
}
@-webkit-keyframes rotate {
from{}
to{
-webkit-transform: rotateY(-360deg);
}
}
.cube{
width: 200px;
height: 200px;
position: absolute;
left: 0;
top:0;
background: rgba(255,255,255,0.6);
text-align: center;
line-height: 200px;
}
#four{
-webkit-transform: rotateY(180deg) translateZ(100px);
}
#one{
-webkit-transform: rotateX(90deg) translateZ(100px);
}
#six{
-webkit-transform: rotateX(-90deg) translateZ(100px);
}
#three{
-webkit-transform: rotateY(90deg) translateZ(100px);
}
#five{
-webkit-transform: rotateY(-90deg) translateZ(100px);
}
#two{
-webkit-transform: translateZ(100px);
}
</style>
</head>
<body>
<div id="container">
<div class="cube" id="one">1</div>
<div class="cube" id="two">2</div>
<div class="cube" id="three">3</div>
<div class="cube" id="four">4</div>
<div class="cube" id="five">5</div>
<div class="cube" id="six">6</div>
</div>
</body>
</html>