-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathturn.html
69 lines (57 loc) · 1.43 KB
/
turn.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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<style>
#toTurn {
width:100px;
height:100px;
position:absolute;
top:100px;
left:100px;
text-indent: 90px;
background-color:red;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$("#toTurn").animate(
{ "left": "+=10"},
{
step: function(now,fx) {
//$(this).css('-webkit-transform','rotate('+now+'deg)');
},
duration:4000,
queue: false,
specialEasing: {
width: 'linear',
height: 'linear',
left: 'linear'
},
complete: function(){
console.log("complete animation!");
}
});
$('#click').click(function(){
console.log("CLICK!");
});
});
</script>
</head>
<body>
<div id="toTurn">
<div>
Hola hola
</div>
<img id="zombie1" src="./zombie.jpg" width="100" height="123" style="position: relative; left: 10px;" ></img>
</div>
<div>
Este es el palito a girar
</div>
<div id="click">
CLICK!
</div>
</body>
</html>