-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdropdown_menu.html
More file actions
48 lines (42 loc) · 964 Bytes
/
dropdown_menu.html
File metadata and controls
48 lines (42 loc) · 964 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
43
44
45
46
47
48
<div class="dropdown">
<button class="dropbtn">Dropdown</button>
<div class="dropdown-content">
<a href="#">Item 1</a>
<a href="#">Item 2</a>
<a href="#">Item 3</a>
</div>
</div>
<style>
.dropdown {
position: relative;
display: inline-block;
}
.dropbtn {
background: #3498db;
color: white;
padding: 12px;
border: none;
cursor: pointer;
}
.dropdown-content {
display: none;
position: absolute;
background: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
min-width: 120px;
animation: fadeIn 0.3s ease-in-out;
}
.dropdown:hover .dropdown-content {
display: block;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>