-
Notifications
You must be signed in to change notification settings - Fork 0
/
dropDown.css
68 lines (58 loc) · 993 Bytes
/
dropDown.css
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
ul {
display: flex;
list-style: none;
padding-left: 0;
}
li {
padding: 0.5rem;
display: block;
color: #fff;
position: relative;
}
li:hover,
li:focus-within {
cursor: pointer;
}
/* hide outline when focussing on link; not a problem because we are providing custom focus state */
li:focus-within a {
outline: none;
}
/* Hide the sub menu*/
ul li ul {
background: inherit;
visibility: hidden;
opacity: 0;
min-width: 5rem;
position: absolute;
transition: all 0.5s ease;
margin-top: 0.5rem;
left: 0;
display: none;
}
/* Show submenu on hover and focus */
ul li:hover > ul,
ul li:focus-within > ul,
ul li ul:hover,
ul li ul:focus {
background-color: aliceblue;
visibility: visible;
opacity: 1;
display: block;
}
ul li ul li:hover {
background-color: lightblue;
}
ul li ul li {
width: 100%;
}
a {
padding: 0.5rem;
text-decoration: none;
font-family: sans-serif;
}
.icon_span {
color: #48aff0;
}
.icon_span:hover {
color: #106ba3;
}