blob: ba99461062d9f425e1fccfdc17c6d5e945233f43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE HTML>
<style>
div {
width:100px;
height:100px;
margin:50px;
background-color:green;
}
#translatex {
-webkit-transform: translatex(calc(50% + 10px));
}
#translatey {
-webkit-transform: translatey(calc(40% - 5px));
}
#translatez {
-webkit-transform: perspective(calc(100px * 5)) translatez(calc(10px + 90px));
}
</style>
<div id="translatex">translate x</div>
<div id="translatey">translate y</div>
<div id="translatez">translate z</div>
|