-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy path3d-intersection.html
57 lines (54 loc) · 1.4 KB
/
3d-intersection.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
<!DOCTYPE html>
<html
<head>
<title>Simple 3D example</title>
<style>
div {
height: 150px;
width: 150px;
}
.container {
border: 1px solid black;
margin: 20px;
padding: 10px;
background-color: rgba(0, 0, 0, 0.3);
-webkit-perspective: 500px;
-moz-perspective: 500px;
-ms-perspective: 500px;
-o-perspective: 500px;
perspective: 500px;
}
.container > div {
position: absolute;
left: 0;
}
.container > :first-child {
-webkit-transform: rotateY(45deg);
-moz-transform: rotateY(45deg);
-ms-transform: rotateY(45deg);
-o-transform: rotateY(45deg);
transform: rotateY(45deg);
background-color: orange;
top: 10px;
height: 135px;
}
.container > :last-child {
-webkit-transform: translateZ(40px);
-moz-transform: translateZ(40px);
-ms-transform: translateZ(40px);
-o-transform: translateZ(40px);
transform: translateZ(40px);
background-color: rgba(0, 0, 255, 0.75);
top: 50px;
height: 100px;
}
</style>
</head>
<body>
<div class="container">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
<div></div>
<div></div>
</div>
</body>
</html>