-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathback.up
62 lines (50 loc) · 1.36 KB
/
back.up
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
<!-- Code Testing -->
<style>
.collapse {
height: 0;
overflow: hidden;
transition: height 3s;
}
@keyframes showMenu {
0% {
height: 0;
}
100% {
height: auto;
}
}
@keyframes hideMenu {
0% {
height: auto;
}
100% {
height: 0;
}
}
.collapse.show {
animation: showMenu 3s forwards;
}
.collapse.hide {
animation: hideMenu 3s forwards;
}
#aa{
height: 100px;
overflow: hidden;
}
</style>
<script>
var collapse_state = true
document.getElementById("toggleButton").addEventListener("click", function () {
var sad = document.getElementById("collapseMenu");
sad.classList.toggle("show");
});
</script>
<button id="toggleButton">Toggle Menu</button>
<div id="aa">
<div>
<p>Menu item 1</p>
<p>Menu item 2</p>
<p>Menu item 3</p>
</div>
</div>
<!-- Code Testing -->