forked from ryanflorence/CSSAnimation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transform_(jQuery).html
88 lines (81 loc) · 1.37 KB
/
Transform_(jQuery).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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<style>
#container {
width: 400px;
height: 280px;
position: absolute;
left: 440px;
top: 40px;
text-align: center;
-webkit-perspective: 800;
}
#transformer {
width: 50%;
height: 50%;
background: #ccc;
line-height: 100px;
font-size: 25px;
}
</style>
<div id=container>
<div id=transformer>Transform me!</div>
</div>
<script src="/depender/build?require=Core/Element.Event,CSSAnimation/jQuery"></script>
<script>
var fixture = $('#transformer'),
transition = new Transition(fixture[0]);
transition.set({
property: 'transform',
'timing-function': 'ease-out',
duration: '500ms'
});
makeActions([
{
fn: function(){
fixture.translate('y', 50);
},
title: "fixture.translate('y', 50)"
},
{
fn: function(){
fixture.rotate({x: 30, y: 30, z: 30});
},
title: "fixture.rotate({x: 30, y: 30, z: 30})"
},
{
fn: function(){
fixture.rotate('z', 0);
},
title: "fixture.rotate('z', 0)"
},
{
fn: function(){
fixture.skew({x: 30, y: -30});
},
title: "fixture.skew({x: 30, y: -30})"
},
{
fn: function(){
fixture.scale(1.2);
},
title: "fixture.scale(1.2)"
},
{
fn: function(){
fixture.scale({x: 0.5, y: 0.9});
},
title: "fixture.scale({x: 0.5, y: 0.9})"
},
{
fn: function(){
fixture.rotate(45);
},
title: "fixture.rotate(45)"
},
{
fn: function(){
fixture.clearTransform();
},
title: 'clearTransform'
}
]);
</script>