-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
84 lines (68 loc) · 1.64 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
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
@import url('https://fonts.googleapis.com/css?family=Hammersmith+One');
* {
padding: 0;
margin: 0;
}
#cubic {
width: 200px;
height: 200px;
margin: 150px auto;
perspective: 800px;
color: #fff;
font-size: 5rem;
font-family: 'Hammersmith One', sans-serif;
text-transform: uppercase;
}
#cubicBox {
width: 200px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-animation: rotate 15s cubic-bezier(.29,.87,.71,-0.57) infinite;
animation: rotate 15s cubic-bezier(.29,.87,.71,-0.57) infinite;
}
#cubic div {
position: absolute;
width: 200px;
height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
#front {
background-color:rgba(65, 105, 225, 0.49);
transform: translateZ(100px);
}
#back {
background-color:rgba(128, 0, 0, 0.46);
transform: rotateY(180deg) translateZ(100px);
}
#right {
background-color: rgba(128, 0, 128, 0.58);
transform: translateX(100px) rotateY(90deg);
}
#left {
background-color: rgba(0, 128, 0, 0.62);
transform: translateX(-100px) rotateY(-90deg);
}
#top {
background-color: rgba(255, 127, 80, 0.48);
transform: translateY(-100px) rotateX(90deg);
}
#bottom {
background-color: rgba(255, 0, 0, 0.3);
transform: translateY(100px) rotateX(-90deg);
}
@keyframes rotate {
0% {
transform: rotateY(0deg);
}
25% {
transform: rotateY(360deg);
}
30% {
transform: rotateX(0deg);
}
70% {
transform: rotateX(360deg);
}
}