-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles2.css
88 lines (76 loc) · 1.67 KB
/
styles2.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
header {
background-color: #f2f2f2;
padding: 10px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
text-align: right;
}
nav ul li {
display: inline-block;
position: relative;
}
nav ul li a {
display: block;
padding: 10px 15px;
text-decoration: none;
color: #333;
}
nav ul li:hover>ul.submenu {
display: block;
}
nav ul li ul.submenu {
display: none;
position: absolute;
top: 100%;
right: 0;
background-color: #f2f2f2;
padding: 0;
text-align: left;
width: max-content;
white-space: nowrap;
}
nav ul li ul.submenu li {
display: block;
}
nav ul li ul.submenu li a {
padding: 10px 15px;
color: #333;
display: block;
}
nav ul li ul.submenu li a:hover {
background-color: #ddd;
}
.submenu-arrow {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
width: 0;
height: 0;
border-style: solid;
border-width: 5px 4px 0 4px;
border-color: #333 transparent transparent transparent;
pointer-events: none;
}
.has-submenu .submenu-arrow.down {
transform: translateY(-50%) rotate(180deg);
}
nav ul li .submenu-arrow {
position: absolute;
top: 50%;
right: -20px;
/* Adjust this value to control the space between menu item and arrow */
transform: translateY(-50%);
width: 0;
height: 0;
border-style: solid;
border-width: 5px 4px 0 4px;
border-color: #333 transparent transparent transparent;
pointer-events: none;
}
.has-submenu .submenu-arrow.down {
transform: translateY(-50%) rotate(180deg);
}