-
Notifications
You must be signed in to change notification settings - Fork 0
/
testAnimation.html
63 lines (60 loc) · 1.5 KB
/
testAnimation.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<style type="text/css">
#wrapper {
height: 100px;
width: 100px;
display: block;
position: relative;
}
.dot {
width: 5px;
height: 5px;
opacity: 0;
position: relative;
}
.blue {
background-color: blue;
}
.red {
background-color: red;
}
.green {
background-color: green;
}
.up {
margin-top: 40px;
margin-left: 60px;
}
</style>
<script type="text/javascript">
function animations() {
$('.down').animate({
opacity: 1,
left: "+=50",
top: "+=30"
}, 3000);
$('.up').animate({
opacity: 1,
right: "+=50",
bottom: "+=30"
}, 3000);
$('.grow').animate({
width: 15,
height: 15
});
}
</script>
<title></title>
</head>
<body onload=animations()>
<div id="wrapper">
<div class="blue dot down"></div>
<div class="red dot up"></div>
<div class="green dot grow up"></div>
</div>
</body>
</html>