This repository was archived by the owner on Jul 7, 2023. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathtask7.html
More file actions
102 lines (89 loc) · 2.31 KB
/
Copy pathtask7.html
File metadata and controls
102 lines (89 loc) · 2.31 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.navbar
{
overflow: hidden;
background-color:palegoldenrod;
border-radius: 20px;
}
.dropdown {
float: left;
overflow: hidden;
}
.dropbtn{
font-size: large;
border: none;
padding: 16px;
margin: 0;
border-radius: 10px;
}
.dropbtn:hover{
background-color: aqua;
}
.dropdown-content,.dropdown-contentc{
display: none;
background-color: cornflowerblue;
font-size: large;
position: absolute;
box-shadow: 6px 0px 6px rgb(150, 136, 118);
}
.dropdown-content a,.dropdown-contentc a{
padding: 12px 16px;
display: block;
text-decoration: none;
text-align: center;
box-shadow: 15px;
}
.dropdown:hover .dropdown-content{
display: block;
border-radius: 15px;
}
.dropdown-content a:hover,.dropdown-contentc a:hover{
background-color: aliceblue;
}
.dropdown:active .dropdown-contentc{
display: block;
border-radius: 15px;
}
</style>
</head>
<body>
<nav class="navbar">
<div class="dropdown">
<button class="dropbtn">Hover</button>
<div class="dropdown-content">
<a href="https://github.com/uditagrawal08">profile</a>
<a href="https://github.com/CC-BHU">Coding club</a>
<a href="https://github.com/uditagrawal08/web-development">Repositry</a>
</div>
</div>
<div class="dropdown">
<button id="dropdownButton" class="dropbtn" onclick="toggleDropdown()">Click</button>
<div id="dropdownContent" class="dropdown-contentc" >
<a href="https://github.com/uditagrawal08">profile</a>
<a href="https://github.com/CC-BHU">Coding club</a>
<a href="https://github.com/uditagrawal08/web-development">Repositry</a>
</div>
</div>
</nav>
<script>
function toggleDropdown() {
if (dropdownContent.style.display == "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
event.stopPropagation();
}
document.onclick = function() {
dropdownContent.style.display = "none";
};
</script>
</body>
</html>