-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
108 lines (96 loc) · 2.5 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
width: 100%;
font-family: sans-serif;
}
body > .content {
margin: 2em;
max-width: 480px;
}
li {
margin-bottom: 0.5em;
}
#cube {
top: 50%;
left: 50%;
margin-top: -180px;
margin-left: -180px;
cursor: pointer;
-webkit-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: perspective(1600px) translateZ(0);
-ms-transform: perspective(1600px) translateZ(0);
transform: perspective(1600px) translateZ(0);
}
#cube,
#cube > .face {
position: absolute;
width: 360px;
height: 360px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cube > .face {
text-align: center;
font-size: 120px;
font-weight: bold;
padding: 120px 12px 0;
-webkit-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
}
#cube > .front.face {
-webkit-transform: translateZ(180px);
-ms-transform: translateZ(180px);
transform: translateZ(180px);
background-color: #ddd;
}
#cube > .back.face {
-webkit-transform: rotateZ(-90deg) rotateY(180deg) translateZ(180px);
-ms-transform: rotateZ(-90deg) rotateY(180deg) translateZ(180px);
transform: rotateZ(-90deg) rotateY(180deg) translateZ(180px);
background-color: #ccc;
color: #f60;
font-size: 160px;
padding-top: 100px;
text-align: left;
}
#cube > .top.face {
-webkit-transform: rotateY(90deg) rotateX(90deg) translateZ(180px);
-ms-transform: rotateY(90deg) rotateX(90deg) translateZ(180px);
transform: rotateY(90deg) rotateX(90deg) translateZ(180px);
background-color: #bbb;
color: #f60;
font-size: 160px;
padding-top: 100px;
text-align: right;
}
#cube > .bottom.face {
-webkit-transform: rotateX(-90deg) translateZ(180px);
-ms-transform: rotateX(-90deg) translateZ(180px);
transform: rotateX(-90deg) translateZ(180px);
background-color: #daa;
}
#cube > .right.face {
-webkit-transform: rotateX(-90deg) rotateY(90deg) translateZ(180px);
-ms-transform: rotateX(-90deg) rotateY(90deg) translateZ(180px);
transform: rotateX(-90deg) rotateY(90deg) translateZ(180px);
background-color: #ada;
}
#cube > .left.face {
-webkit-transform: rotateX(-90deg) rotateY(-90deg) translateZ(180px);
-ms-transform: rotateX(-90deg) rotateY(-90deg) translateZ(180px);
transform: rotateX(-90deg) rotateY(-90deg) translateZ(180px);
background-color: #aad;
}
#cube > .face > img {
width: 100%;
height: auto;
}