forked from GuruprasadGaonkar/Hackotoberfest2k21
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCube.html
More file actions
79 lines (77 loc) · 1.72 KB
/
Copy pathCube.html
File metadata and controls
79 lines (77 loc) · 1.72 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
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
body{
background:#ddd;
}
.wrapper{
position:absolute;
top:50%;
left:50%;
perspective:1750px;
transition-duration:2s;
}
.wrapper:hover{
transform:rotate(90deg);
}
.box-area{
position:relative;
transform-style:preserve-3d;
transform:rotate(90deg,90deg);
animation:rotate 20s linear infinite;
}
@keyframes rotate{
0%{
transform:rotate3d(0,0,0,0);
}
100%{
transform:rotate3d(0,1,0,360deg);
}
}
.box{
position:absolute;
width:150px;
height:150px;
border:2px solid #000;
}
.box-front{
transform:translate3d(-75px,-75px,75px);
background:rgba(220, 20, 60,0.5);
}
.box-back{
transform:translate3d(-75px,-75px,-75px);
background:rgba(0, 255, 0,0.5);
}
.box-left{
transform:translate(-150px,-75px) rotateY(90deg);
background:rgba(128, 0, 128,0.5);
}
.box-right{
transform:translateY(-75px) rotateY(90deg);
background:rgba(0, 255, 255,0.5);
}
.box-top{
transform:translate(-75px,-150px) rotateX(90deg);
background:rgba(25, 25, 112,0.5);
}
.box-bottom{
transform:translateX(-75px) rotateX(90deg);
background:rgba(255, 20, 147,0.5);
}
</style>
</head>
<body>
<div class="wrapper">
<div class="box-area">
<div class="box box-front"></div>
<div class="box box-back"></div>
<div class="box box-left"></div>
<div class="box box-right"></div>
<div class="box box-top"></div>
<div class="box box-bottom"></div>
</div>
</div>
</body>
</html>