-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcube.html
More file actions
98 lines (80 loc) · 2.12 KB
/
Copy pathcube.html
File metadata and controls
98 lines (80 loc) · 2.12 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
@-webkit-keyframes rotate {
0% { -webkit-transform: rotateY(0); }
100% { -webkit-transform: rotateY(360deg); }
}
.stage {
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
width: 300px;
height: 300px;
-webkit-perspective:1600px;
-webkit-perspective-origin: 50% -400px;
}
figure {
display: block;
position: absolute;
width: 300px;
height: 300px;
background-color:rgba(96,194,239,0.5);
border:1px solid rgba(255,255,255,0.5);
}
.cube {
-webkit-transform-style: preserve-3d;
-webkit-animation: rotate 10s infinite linear;
}
figure {
-webkit-transform-origin: 50% 50% 0;
}
.middleFirst {
-webkit-transform: translateZ(0px) rotateY(90deg);
}
.middleSecond {
-webkit-transform: translateZ(0px) rotateX(0deg);
}
.middleThird {
-webkit-transform: translateZ(0px) rotateX(90deg);
}
.front {
-webkit-transform: translateZ(150px);
}
.back {
-webkit-transform: rotateY(180deg) translateZ(150px)
}
.top {
-webkit-transform: rotateX(90deg) translateZ(150px);
background-color:rgba(96,194,239,0.0);
}
.bottom {
-webkit-transform: rotateX(-90deg) translateZ(150px);
}
.left {
-webkit-transform: rotateY(-90deg) translateZ(150px);
}
.right {
-webkit-transform: rotateY(90deg) translateZ(150px);
}
</style>
</head>
<body>
<div class="stage">
<div class="cube">
<figure class="back"></figure>
<figure class="top"></figure>
<figure class="bottom"></figure>
<figure class="left"></figure>
<figure class="right"></figure>
<figure class="front"></figure>
<figure class="middleFirst"></figure>
<figure class="middleSecond"></figure>
<figure class="middleThird"></figure>
</div>
</div>
</body>
</html>