-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy path102_backface.html
36 lines (31 loc) · 961 Bytes
/
102_backface.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
<!DOCTYPE HTML>
<html>
<head>
<style>
head, style {display: block;}
[contenteditable] {-webkit-user-modify: read-write-plaintext-only;}
style:first-of-type {visibility:hidden;}
style:last-of-type {padding: 20px; font-size: 1.5em; white-space: pre; font-family: monospace; background-color: rgba(255,255,255,0.5);}
html {min-height:100%;}
.box, .box:after {margin: auto; height: 100px; width: 100px; background-color: indianred; }
.box:after {
background-color: goldenrod; content: ''; display: block;
}
p {font-family: helvetica, arial, sans-serif; text-align: center;}
</style>
<style contenteditable>
.box {-webkit-perspective: 1000px;}
.box:after {
-webkit-transform:
rotate3d(130,110,80,25deg)
perspective(200);
-webkit-transform-origin: bottom right;
}
</style>
<title>Transform origin</title>
</head>
<body>
<div class="box"></div>
<p>Apply perspective to parent element. smaller # = closer; larger # = farther</p>
</body>
</html>