-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexperiment01b.html
More file actions
51 lines (42 loc) · 1.23 KB
/
experiment01b.html
File metadata and controls
51 lines (42 loc) · 1.23 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
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Experiment 01b</title>
<!-- Source: https://codepen.io/desandro/pen/XqMGRB -->
<style>
/* 200x200 box with thin border */
.scene {
width: 200px;
height: 200px;
border: 1px solid #CCC;
margin: 40px;
}
/* panel filling the box */
.panel {
width: 100%;
height: 100%;
}
/* red panel : define perspective in transform property */
.panel.one {
transform: perspective(400px) rotateY(45deg);
background: red;
}
/* blue panel: define perspective sperately */
.scene.two {
perspective: 400px;
}
.panel.two {
background: blue;
transform: rotateY(45deg);
}
</style>
</head>
<body>
<div class="scene one">
<div class="panel one"></div>
</div>
<div class="scene two">
<div class="panel two"></div>
</div>
</body>
</html>