forked from jonsuh/Responsive-CSS3-Menu-with-Dropdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs-css-menu.css
More file actions
216 lines (210 loc) · 7.15 KB
/
js-css-menu.css
File metadata and controls
216 lines (210 loc) · 7.15 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/*
* Responsive CSS3 Menu with Dropdown (Horizontal and Vertical)
* http://www.jonsuh.com
*
* Copyright (c) 2012 Jonathan Suh
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
/* PRIMARY MENU style */
.js-css-menu {
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
border: 1px solid #900000;
display: inline-block;
}
.js-css-menu, .js-css-menu ul, .js-css-menu li {
list-style: none;
padding: 0;
margin: 0;
}
.js-css-menu a {
text-decoration: none;
-moz-transition: all 0.15s ease-in-out;
-webkit-transition: all 0.15s ease-in-out;
-o-transition: all 0.15s ease-in-out;
-ms-transition: all 0.15s ease-in-out;
transition: all 0.15s ease-in-out;
}
.js-css-menu > li {
display: inline-block;
float: left;
}
.js-css-menu > li > a {
color: #fefefe;
text-shadow: 0 -1px 0 maroon;
background-color: #dd0000;
background-image: linear-gradient(top, #dd0000 20%, #aa0000);
background-image: -moz-linear-gradient(top, #dd0000 20%, #aa0000);
background-image: -webkit-linear-gradient(top, #dd0000 20%, #aa0000);
background-image: -o-linear-gradient(top, #dd0000 20%, #aa0000);
background-image: -ms-linear-gradient(top, #dd0000 20%, #aa0000);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dd0000) 20%, to(#aa0000));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$to', EndColorStr='$from');
padding: 10px 15px;
display: block;
}
.js-css-menu > li:hover > a {
background-color: #fa0000;
background-image: linear-gradient(top, #fa0000 20%, #af0000);
background-image: -moz-linear-gradient(top, #fa0000 20%, #af0000);
background-image: -webkit-linear-gradient(top, #fa0000 20%, #af0000);
background-image: -o-linear-gradient(top, #fa0000 20%, #af0000);
background-image: -ms-linear-gradient(top, #fa0000 20%, #af0000);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fa0000) 20%, to(#af0000));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$to', EndColorStr='$from');
}
.js-css-menu > li > a:active {
background-color: #aa0000;
background-image: linear-gradient(top, #aa0000 20%, #cc0000);
background-image: -moz-linear-gradient(top, #aa0000 20%, #cc0000);
background-image: -webkit-linear-gradient(top, #aa0000 20%, #cc0000);
background-image: -o-linear-gradient(top, #aa0000 20%, #cc0000);
background-image: -ms-linear-gradient(top, #aa0000 20%, #cc0000);
background-image: -webkit-gradient(linear, left top, left bottom, from(#aa0000) 20%, to(#cc0000));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$to', EndColorStr='$from');
box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
-moz-box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
-webkit-box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
}
.js-css-menu > li.current > a {
background-color: #880000;
background-image: linear-gradient(top, #880000 20%, #aa0000);
background-image: -moz-linear-gradient(top, #880000 20%, #aa0000);
background-image: -webkit-linear-gradient(top, #880000 20%, #aa0000);
background-image: -o-linear-gradient(top, #880000 20%, #aa0000);
background-image: -ms-linear-gradient(top, #880000 20%, #aa0000);
background-image: -webkit-gradient(linear, left top, left bottom, from(#880000) 20%, to(#aa0000));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$to', EndColorStr='$from');
box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
-moz-box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
-webkit-box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
}
/* SUBMENU */
.js-css-menu > li div {
border-top: 1px solid #900000;
display: block;
position: absolute;
visibility: hidden;
opacity: 0;
-moz-transition: all 0.15s ease-in-out;
-webkit-transition: all 0.15s ease-in-out;
-o-transition: all 0.15s ease-in-out;
-ms-transition: all 0.15s ease-in-out;
transition: all 0.15s ease-in-out;
}
.js-css-menu > li div a {
color: #ddd;
}
.js-css-menu > li div a:hover, .js-css-menu > li div a:focus {
color: #fefefe;
}
.js-css-menu > li div ul {
float: left;
}
.js-css-menu > li div ul li {
line-height: 1.5em;
}
.js-css-menu > li div ul:not(:first-child) {
margin-left: 20px;
}
.js-css-menu > li:hover div, .js-css-menu > li:focus div {
color: #fefefe;
background: #b00000;
padding: 10px 15px;
visibility: visible;
opacity: 1;
}
/* VERTICAL style */
.js-css-menu.vertical {
width: 100px; /* Adjust the width of the vertical menu */
}
.js-css-menu.vertical > li {
display: block;
float: none;
position: relative;
}
.js-css-menu.vertical > li div {
width: 150px;
left: 101px; /* Adjust the left value according to the width of the vertical menu */
top: 0;
}
/* ROUNDED style */
.js-css-menu.rounded {
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.js-css-menu.rounded > li:first-child > a {
border-top-left-radius: 2px;
-moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px;
}
.js-css-menu.rounded > li:last-child > a {
border-top-right-radius: 2px;
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
-webkit-border-bottom-right-radius: 2px;
}
.js-css-menu.rounded > li div {
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-top-left-radius: 0;
-moz-border-radius-topleft: 0;
-webkit-border-top-left-radius: 0;
}
.js-css-menu.rounded.vertical > li:first-child > a {
border-bottom-left-radius: 0;
-moz-border-radius-bottomleft: 0;
-webkit-border-bottom-left-radius: 0;
border-top-right-radius: 2px;
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
}
.js-css-menu.rounded.vertical > li:last-child > a {
border-top-right-radius: 0;
-moz-border-radius-topright: 0;
-webkit-border-top-right-radius: 0;
border-bottom-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px;
}
/* SHADOW style */
.js-css-menu.shadow, .js-css-menu.shadow div {
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* RESPONSIVE style */
@media (max-width: 480px) { /* To adjust the "breaking point" of the responsive menu, change 480px to a value of your choosing. */
.js-css-menu.responsive, .js-css-menu.responsive > li {
width: auto!important;
display: block;
float: none;
}
.js-css-menu.responsive > li:first-child > a {
border-bottom-left-radius: 0 !important;
-moz-border-radius-bottomleft: 0 !important;
-webkit-border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
-moz-border-radius-bottomright: 0 !important;
-webkit-border-bottom-right-radius: 0 !important;
}
.js-css-menu.responsive > li:last-child > a {
border-top-left-radius: 0 !important;
-moz-border-radius-topleft: 0 !important;
-webkit-border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
-moz-border-radius-topright: 0 !important;
-webkit-border-top-right-radius: 0 !important;
}
.js-css-menu.responsive > li div {
display: none!important;
}
}