-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsort.html
More file actions
42 lines (39 loc) · 763 Bytes
/
sort.html
File metadata and controls
42 lines (39 loc) · 763 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>排序算法可视化</title>
<script type="text/javascript" src="js/sort/sort-data.js"></script>
<script type="text/javascript" src="js/sort/bubble-sort.js"></script>
<style type="text/css">
.sort-box{
width: 500px;
height: 580px;
margin: 0 auto;
display: flex;
flex-direction: column;
}
.sort-box > canvas{
flex: 1;
}
.filter{
height: 80px;
}
</style>
</head>
<body>
<div class="sort-box">
<canvas>当前浏览器不支持canvas</canvas>
<div class="filter">
</div>
</div>
<script type="text/javascript">
let bubble = new BubbleSort({
len: 100,
bound: 100,
parent: '.sort-box'
});
bubble.sort();
</script>
</body>
</html>