-
Notifications
You must be signed in to change notification settings - Fork 0
/
CssWork-9.1.html
118 lines (99 loc) · 2.65 KB
/
CssWork-9.1.html
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
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="https://cdn.discordapp.com/attachments/838877542269845525/878217894956249118/icon1.png" />
<title>CssWork-10</title>
<style>
* {
margin: 0;
padding: 0;
font-family: sans-serif;
}
body {
height: 100vh;
background: radial-gradient(rgb(32, 83, 141), blue);
}
.container {
height: 60vh;
width: 30vw;
position: absolute;
top: 50vh;
left: 50vw;
transform: translate(-50%, -50%);
perspective: 1000px;
}
.box {
height: 250px;
width: 250px;
position: absolute;
top: 100px;
left: 100px;
transform-style: preserve-3d;
animation: rotate 2s infinite;
}
@keyframes rotate {
0% {
transform: rotateY(180deg);
}
50% {
transform: rotateX(90deg);
}
75% {
transform: rotateY(180deg);
}
100% {
transform: rotateX(180deg);
}
}
.card {
height: 250px;
width: 250px;
text-align: center;
padding: 100px 0px;
color: white;
background-color: black;
border: 2px solid white;
font-size: 32px;
box-sizing: border-box;
position: absolute;
}
#Front {
transform: translateZ(125px);
}
#Back {
transform: translateZ(-125px);
}
#Left {
right: 125px;
transform: rotateY(-90deg);
}
#Right {
left: 125px;
transform: rotateY(90deg);
}
#Top {
bottom: 125px;
transform: rotateX(90deg);
}
#Bottom {
top: 125px;
transform: rotateX(-90deg);
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<div class="card" id="Front">Front</div>
<div class="card" id="Back">Back</div>
<div class="card" id="Left">Left</div>
<div class="card" id="Right">Right</div>
<div class="card" id="Top">Top</div>
<div class="card" id="Bottom">Bottom</div>
</div>
</div>
</body>
</html>