-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest1.htm
53 lines (36 loc) · 1.32 KB
/
test1.htm
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
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="basic/basic.min.css">
<script src="basic/basic.min.js" type="text/javascript" charset="utf-8"></script>
<script>
const colorList = ["blue", "red", "green", "yellow", "orange"];
const start = function() {
page.color = "white";
for (let i = 0; i < 30; i++) {
for (let k = 0; k < 40; k++) {
createAnimatedObject(i * 20, k * 20);
}
}
}
const createAnimatedObject = function(left = 0, top = 0) {
const box = createBox(left, top);
box.width = 2;
box.height = 20;
box.round = 3;
box.color = colorList[random(0, 4)];
setTimeout(function() {
setInterval(function () {
box.rotate += 1;
}, 1);
}, left + top);
}
</script>
</head>
<body>
<!-- HTML content -->
</body>
</html>