-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenubar.html
80 lines (78 loc) · 2.19 KB
/
menubar.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<style>
*{
margin-top: auto;
/* removes unnecessary gap in the starting of the page*/
}
.menu{
font-size: 30px;
cursor: pointer;
background-color: black;
color: white;
width: 50px;
height: 50px;
position: fixed;
top: 10px;
right: 10px;
text-align: center;
z-index: 2;
}
.container{
display: none;
right: 0;
top: 0;
position: absolute;
z-index: 1;
}
.container>div{
display: block;
padding: 20px;
border-bottom: 6px solid white;
background-color: rgba(84, 82, 82, 0.5);
color: white;
font-size: 20px;
}
.container>div:hover{
background-color: rgba(0, 0, 0, 0.8);
}
.bottom{
position: fixed;
bottom: 0;
left: 0;
}
</style>
</head>
<body>
<a class="menu">☰</a>
<div class="container">
<div>HOME</div>
<div>ABOUT US</div>
<div>CONTACT</div>
<div>SLIDE</div>
</div>
<script>
$(document).ready(function(){
$(".menu").click(function(){
$(".container").slideToggle();
$(".menu").text()=='☰' ? $(".menu").text("✖") : $(".menu").text("☰");
})
})
</script>
<div class="bottom">
<br>
<a href="menubar.html">1. menubar html</a><br>
<a href="index.html"> 2. Drag and drop</a><br>
<a href="slide.html">3. Carousal(Slides)</a><br>
<a href="nepaliTime.html">4. Nepali Date and time</a><br>
<a href="ticTacToe.html">5. Tic Tac Toe</a><br>
<a href="Quiz.html">6. Quiz file</a><br>
</div>
</body>
</html>