-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexperiment04.html
More file actions
76 lines (61 loc) · 1.86 KB
/
experiment04.html
File metadata and controls
76 lines (61 loc) · 1.86 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
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Experiment 03</title>
<!-- https://codepen.io/desandro/pen/bMqZmr -->
<style>
body { font-family: sans-serif; }
.scene {
width: 200px;
height: 200px;
border: 1px solid #CCC;
display: inline-block;
width: 200px;
height: 200px;
margin: 60px 60px 60px 0;
perspective: 600px;
}
.panel {
width: 100%;
height: 100%;
background: hsla(0, 100%, 50%, 0.7);
line-height: 200px;
color: white;
font-size: 18px;
text-align: center;
}
.panel--translate-neg-z {
transform: translateZ(-200px);
}
.panel--translate-pos-z {
transform: translateZ(200px);
}
.panel--rotate-x {
transform: rotateX(45deg);
}
.panel--rotate-y {
transform: rotateY(45deg);
}
.panel--rotate-z {
transform: rotateZ(45deg);
}
</style>
</head>
<body>
<div class="scene">
<div class="panel panel--translate-neg-z">translateZ(-200px)</div>
</div>
<div class="scene">
<div class="panel panel--translate-pos-z">translateZ(200px)</div>
</div>
<div class="scene">
<div class="panel panel--rotate-x">rotateX(45deg)</div>
</div>
<div class="scene">
<div class="panel panel--rotate-y">rotateY(45deg)</div>
</div>
<div class="scene">
<div class="panel panel--rotate-z">rotateZ(45deg)</div>
</div>
</body>
</html>