-
Notifications
You must be signed in to change notification settings - Fork 0
/
bubble_sort.html
82 lines (71 loc) · 1.98 KB
/
bubble_sort.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>버블 정렬</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
<style>
* {
margin: 0;
}
p {
display: inline-block;
width: 2rem;
margin: 0.1rem;
margin-right: 1rem;
padding: 0.2rem;
border-radius: 0.2rem;
transition: 0.3s;
}
a {
position: fixed;
bottom: 10rem;
right: 1rem;
border-radius: 0.6rem;
padding: 0.3rem;
cursor: pointer;
transition: 0.5s;
}
a:hover {
background-color: rgb(255, 189, 66);
box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}
.container {
padding: 0;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
background-color: #e2e8f0;
height: 100vh;
}
#numbers {
padding: 0.2rem;
margin-top: 2rem;
width: 90%;
background-color: white;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.selected {
animation: headShake;
animation-duration: 0.25s;
}
.compare {
background-color: #faf089;
}
.fin {
background-color: #ed8936;
animation: heartBeat;
animation-duration: 0.5s;
}
</style>
</head>
<body>
<div class="container">
<div id="numbers"></div>
<a id="startbtn">let's sort them</a>
<script src="bubble_sort.js"></script>
</div>
</body>
</html>