-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube.css
79 lines (73 loc) · 1.98 KB
/
cube.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
/* Code by Iddan Aaronsohn, 2016 */
/* based on https://desandro.github.io/3dtransforms/docs/cube.html */
.logo h1 {
width: 3.6em; /* x1 */
height: 3.6em; /* x1 */
position: relative;
margin: 11.14px; /* :π */
transform-origin: center;
-ms-transform-origin: center;
-webkit-transform-origin: center;
font-size: 1.8em; /* scale the cube size up */
/* transform: scale(0.8); */ /* scale the cube down */
}
.logo h1 a {
width: 100%;
height: 100%;
position: absolute;
display: block;
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
transition: transform 0.4s;
-webkit-transition: transform 0.4s;
font-size: 3.75em;
}
.logo h1 a span {
width: 100%;
height: 100%;
position: absolute;
background: white;
text-align: center;
display: block;
border-radius: .034em;
}
.logo h1 a span b {
width: calc(92%);
height: calc(92%);
background: #e43;
color: white;
display: block;
position: absolute;
font-weight: 600;
top: 4%;
left: 4%;
line-height: 1.1em;
font-size: 0.9em;
}
.logo h1 a span:nth-child(1) {
transform: rotateY(0deg) translateZ(0.463em); /* x0.5 */
-webkit-transform: rotateY(0deg) translateZ(0.463em);
}
.logo h1 a span:nth-child(2) {
transform: rotateY(180deg) translateZ(0.463em); /* x0.5 */
-webkit-transform: rotateY(180deg) translateZ(0.463em);
}
.logo h1 a span:nth-child(3) {
transform: rotateY(90deg) translateZ(0.463em); /* x0.5 */
-webkit-transform: rotateY(90deg) translateZ(0.463em);
}
.logo h1 a span:nth-child(4) {
transform: rotateY(-90deg) translateZ(0.463em); /* x0.5 */
-webkit-transform: rotateY(-90deg) translateZ(0.463em);
}
.logo h1 a span:nth-child(5) {
transform: rotateX(90deg) translateZ(0.463em); /* x0.5 */
-webkit-transform: rotateX(90deg) translateZ(0.463em);
}
.logo h1 a span:nth-child(6) {
transform: rotateX(-90deg) translateZ(0.463em); /* x0.5 */
-webkit-transform: rotateX(-90deg) translateZ(0.463em);
}
.logo h1 a {
transform: rotateX(-35deg) rotateY(-45deg);
}