-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyboard-navigable-multi-level-menu.css
147 lines (140 loc) · 2.61 KB
/
keyboard-navigable-multi-level-menu.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*
* Stylesheet for Keyboard Navigable Multi Level Menu
*
* Designed by ZulNs, @Gorontalo, Indonesia, 9 May 2017
*/
body {
background: #0cc;
margin: 0px auto;
font-family: Verdana, sans-serif;
}
.menu-wrap>nav>ul:after {
display: block;
clear: both;
content: '';
}
/*----- Menu Outline -----*/
.menu-wrap {
width: 100%;
box-shadow: 0px 1px 3px rgba(0,0,0,0.2);
background: #333;
margin: 0px auto;
font-family: Verdana, sans-serif;
font-size: 16px;
}
.menu-wrap>nav {
/*width: 1000px;*/
margin: 0px auto;
}
.menu-wrap li {
margin: 0px;
list-style: none;
}
.menu-wrap a {
transition: all linear 0.25s;
color: #aaa;
text-decoration: none;
/*pointer-events: none;*/
}
.menu-wrap .current>a {
color: #0dd;
}
.menu-wrap .down-arrow {
font-size: 0.5em;
}
.menu-wrap .left-arrow {
float: right;
font-size: 0.5em;
line-height: 250%;
}
/*----- Top Level -----*/
.menu-wrap>nav>ul>li {
float: left;
/*display: inline-block;*/
position: relative;
font-size: 1em;
}
.menu-wrap>nav>ul>li>a {
padding: 10px 40px;
display: inline-block;
text-shadow: 0px 1px 0px rgba(0,0,0,0.4);
}
.menu-wrap .root>li:hover>a,
.menu-wrap .root>.hover>a,
.menu-wrap .root>.current>a,
.menu-wrap .root>li>a:focus
{
background: #111;
}
/*----- General Sub Menu -----*/
.menu-wrap .root ul {
visibility: hidden;
padding: 5px 0px;
position: absolute;
z-index: -1;
opacity: 0;
transition: all linear 0.25s;
box-shadow: 0px 2px 3px rgba(0,0,0,0.2);
background: #111;
}
.menu-wrap .show {
z-index: 1 !important;
opacity: 1 !important;
visibility: visible !important;
}
.menu-wrap .root>li li {
font-size: 1em;
position: relative;
}
.menu-wrap .root>li li>a {
display: block;
padding: 10px 30px;
}
.menu-wrap .root>li li:hover>a,
.menu-wrap .root>li .hover>a,
.menu-wrap .root>li .current>a,
.menu-wrap .root>li>ul a:focus
{
background: #333;
}
/*----- Menu Level 1 -----*/
.menu-wrap .level-1 {
width: 120%;
top: 100%;
left: 0px;
line-height: 0%;
}
.menu-wrap .level-1.show {
line-height: 100% !important;
}
/*----- Menu Level 2 & 3 -----*/
.menu-wrap .level-2,
.menu-wrap .level-3
{
width: 0%;
top: -14%;
left: 100%;
}
.menu-wrap .level-2.show,
.menu-wrap .level-3.show
{
width: 100% !important;
}
/*----- Contents Outline -----*/
.contents {
margin: 0 20px;
}
.contents>div {
visibility: hidden;
opacity: 0;
position: absolute;
margin: 0 auto;
padding: 0;
line-height: 0%;
transition: all linear 0.25s;
}
.contents .show {
visibility: visible;
opacity: 1;
line-height: 100%;
}