質問編集履歴
2
閉じタグ追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
<li class="luxbar-item"><a href="#menu4">MENU4</a></li>
|
50
50
|
|
51
|
-
<li class="luxbar-item"><a href="#menu5">MENU5</a>
|
51
|
+
<li class="luxbar-item"><a href="#menu5">MENU5</a></li>
|
52
52
|
|
53
53
|
</ul>
|
54
54
|
|
1
HTML、CSSを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,3 +13,493 @@
|
|
13
13
|
jQueryなどを使えば、閉じることは可能でしょうか?
|
14
14
|
|
15
15
|
また、その際はどのような記述をすれば良いかご教示いただきたいです。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
・HTMLメニュー部分
|
20
|
+
|
21
|
+
```ここに言語を入力
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
<header id="luxbar" class="luxbar-fixed">
|
26
|
+
|
27
|
+
<input type="checkbox" class="luxbar-checkbox" id="luxbar-checkbox"/>
|
28
|
+
|
29
|
+
<div class="luxbar-menu luxbar-menu-right luxbar-menu-dark">
|
30
|
+
|
31
|
+
<ul class="luxbar-navigation">
|
32
|
+
|
33
|
+
<li class="luxbar-header">
|
34
|
+
|
35
|
+
<a href="#" class="luxbar-brand"><img src="img/sanrio_logo.png" class="sanrioLogo"></a>
|
36
|
+
|
37
|
+
<label class="luxbar-hamburger luxbar-hamburger-doublespin"
|
38
|
+
|
39
|
+
id="luxbar-hamburger" for="luxbar-checkbox"> <span></span> </label>
|
40
|
+
|
41
|
+
</li>
|
42
|
+
|
43
|
+
<li class="luxbar-item"><a href="#menu1">MENU1</a></li>
|
44
|
+
|
45
|
+
<li class="luxbar-item"><a href="#menu2">MENU2</a></li>
|
46
|
+
|
47
|
+
<li class="luxbar-item"><a href="#menu3">MENU3</a></li>
|
48
|
+
|
49
|
+
<li class="luxbar-item"><a href="#menu4">MENU4</a></li>
|
50
|
+
|
51
|
+
<li class="luxbar-item"><a href="#menu5">MENU5</a>
|
52
|
+
|
53
|
+
</ul>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
</header>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<div id="menu1">
|
64
|
+
|
65
|
+
コンテンツが入ります。
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<div id="menu2">
|
70
|
+
|
71
|
+
コンテンツが入ります。
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div id="menu3">
|
76
|
+
|
77
|
+
コンテンツが入ります。
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div id="menu4">
|
82
|
+
|
83
|
+
コンテンツが入ります。
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="menu5">
|
88
|
+
|
89
|
+
コンテンツが入ります。
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
```
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
・メニュー部分CSS
|
98
|
+
|
99
|
+
```ここに言語を入力
|
100
|
+
|
101
|
+
.luxbar-default {
|
102
|
+
|
103
|
+
width: 100%;
|
104
|
+
|
105
|
+
position: relative;
|
106
|
+
|
107
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); }
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
.luxbar-static {
|
112
|
+
|
113
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
114
|
+
|
115
|
+
width: 100%;
|
116
|
+
|
117
|
+
position: absolute;
|
118
|
+
|
119
|
+
top: 0;
|
120
|
+
|
121
|
+
left: 0; }
|
122
|
+
|
123
|
+
.luxbar-static .luxbar-checkbox:checked ~ .luxbar-menu {
|
124
|
+
|
125
|
+
position: absolute; }
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
.luxbar-fixed {
|
130
|
+
|
131
|
+
width: 100%;
|
132
|
+
|
133
|
+
position: fixed;
|
134
|
+
|
135
|
+
top: 0;
|
136
|
+
|
137
|
+
left: 0;
|
138
|
+
|
139
|
+
z-index: 1000;
|
140
|
+
|
141
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); }
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
.luxbar-fixed-bottom {
|
146
|
+
|
147
|
+
width: 100%;
|
148
|
+
|
149
|
+
position: fixed;
|
150
|
+
|
151
|
+
bottom: 0;
|
152
|
+
|
153
|
+
left: 0;
|
154
|
+
|
155
|
+
z-index: 1000;
|
156
|
+
|
157
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); }
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
.luxbar-hamburger span, .luxbar-hamburger span::before, .luxbar-hamburger span::after {
|
162
|
+
|
163
|
+
display: block;
|
164
|
+
|
165
|
+
height: 2px;
|
166
|
+
|
167
|
+
width: 26px;
|
168
|
+
|
169
|
+
transition: 0.6s ease; }
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
.luxbar-checkbox:checked ~ .luxbar-menu li .luxbar-hamburger span {
|
174
|
+
|
175
|
+
background-color: transparent; }
|
176
|
+
|
177
|
+
.luxbar-checkbox:checked ~ .luxbar-menu li .luxbar-hamburger span::before, .luxbar-checkbox:checked ~ .luxbar-menu li .luxbar-hamburger span::after {
|
178
|
+
|
179
|
+
margin-top: 0; }
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
.luxbar-header {
|
184
|
+
|
185
|
+
display: flex;
|
186
|
+
|
187
|
+
flex-direction: row;
|
188
|
+
|
189
|
+
justify-content: space-between;
|
190
|
+
|
191
|
+
align-items: center;
|
192
|
+
|
193
|
+
height: 65px;
|
194
|
+
|
195
|
+
text-align: left;
|
196
|
+
|
197
|
+
padding-left: 10px;
|
198
|
+
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
.luxbar-menu-left .luxbar-navigation, .luxbar-menu-left .luxbar-header {
|
204
|
+
|
205
|
+
justify-content: flex-start; }
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
.luxbar-menu-right .luxbar-hamburger {
|
210
|
+
|
211
|
+
margin-left: auto; }
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
.luxbar-brand {
|
216
|
+
|
217
|
+
padding-right: 10px;
|
218
|
+
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
.luxbar-menu {
|
224
|
+
|
225
|
+
min-height: 58px;
|
226
|
+
|
227
|
+
transition: 0.6s ease;
|
228
|
+
|
229
|
+
width: 100%; }
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
.luxbar-navigation {
|
234
|
+
|
235
|
+
display: flex;
|
236
|
+
|
237
|
+
flex-direction: column;
|
238
|
+
|
239
|
+
list-style: none;
|
240
|
+
|
241
|
+
padding-left: 0;
|
242
|
+
|
243
|
+
margin: 0;
|
244
|
+
|
245
|
+
text-align: right;}
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
.luxbar-menu a,
|
250
|
+
|
251
|
+
.luxbar-item a {
|
252
|
+
|
253
|
+
text-decoration: none;
|
254
|
+
|
255
|
+
color: inherit;
|
256
|
+
|
257
|
+
cursor: pointer; }
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
.luxbar-item {
|
262
|
+
|
263
|
+
height: 58px; }
|
264
|
+
|
265
|
+
.luxbar-item a {
|
266
|
+
|
267
|
+
padding: 18px 9px 18px 9px;
|
268
|
+
|
269
|
+
display: block;
|
270
|
+
|
271
|
+
line-height: 98%;
|
272
|
+
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
.luxbar-hamburger {
|
278
|
+
|
279
|
+
padding: 18px 24px 18px 24px;
|
280
|
+
|
281
|
+
position: relative;
|
282
|
+
|
283
|
+
cursor: pointer; }
|
284
|
+
|
285
|
+
.luxbar-hamburger span::before, .luxbar-hamburger span::after {
|
286
|
+
|
287
|
+
content: '';
|
288
|
+
|
289
|
+
position: absolute; }
|
290
|
+
|
291
|
+
.luxbar-hamburger span::before {
|
292
|
+
|
293
|
+
margin-top: -8px; }
|
294
|
+
|
295
|
+
.luxbar-hamburger span::after {
|
296
|
+
|
297
|
+
margin-top: 8px; }
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
.luxbar-checkbox {
|
302
|
+
|
303
|
+
display: none; }
|
304
|
+
|
305
|
+
.luxbar-checkbox:not(:checked) ~ .luxbar-menu {
|
306
|
+
|
307
|
+
overflow: hidden;
|
308
|
+
|
309
|
+
height: 58px; }
|
310
|
+
|
311
|
+
.luxbar-checkbox:checked ~ .luxbar-menu {
|
312
|
+
|
313
|
+
transition: height 0.6s ease;
|
314
|
+
|
315
|
+
height: 100vh;
|
316
|
+
|
317
|
+
overflow: auto;
|
318
|
+
|
319
|
+
}
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
.dropdown {
|
324
|
+
|
325
|
+
position: relative;
|
326
|
+
|
327
|
+
height: auto;
|
328
|
+
|
329
|
+
min-height: 58px; }
|
330
|
+
|
331
|
+
.dropdown:hover > ul {
|
332
|
+
|
333
|
+
position: relative;
|
334
|
+
|
335
|
+
display: block;
|
336
|
+
|
337
|
+
min-width: 100%; }
|
338
|
+
|
339
|
+
.dropdown > a::after {
|
340
|
+
|
341
|
+
position: absolute;
|
342
|
+
|
343
|
+
content: '';
|
344
|
+
|
345
|
+
right: 10px;
|
346
|
+
|
347
|
+
top: 25px;
|
348
|
+
|
349
|
+
border-width: 5px 5px 0;
|
350
|
+
|
351
|
+
border-color: transparent;
|
352
|
+
|
353
|
+
border-style: solid; }
|
354
|
+
|
355
|
+
.dropdown > ul {
|
356
|
+
|
357
|
+
display: block;
|
358
|
+
|
359
|
+
overflow-x: hidden;
|
360
|
+
|
361
|
+
list-style: none;
|
362
|
+
|
363
|
+
padding: 0; }
|
364
|
+
|
365
|
+
.dropdown > ul .luxbar-item {
|
366
|
+
|
367
|
+
min-width: 100%;
|
368
|
+
|
369
|
+
height: 29px;
|
370
|
+
|
371
|
+
padding: 5px 10px 5px 40px; }
|
372
|
+
|
373
|
+
.dropdown > ul .luxbar-item a {
|
374
|
+
|
375
|
+
min-height: 29px;
|
376
|
+
|
377
|
+
line-height: 29px;
|
378
|
+
|
379
|
+
padding: 0; }
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
@media screen and (min-width: 767px) {
|
384
|
+
|
385
|
+
.luxbar-navigation {
|
386
|
+
|
387
|
+
flex-flow: row;
|
388
|
+
|
389
|
+
justify-content: flex-end;
|
390
|
+
|
391
|
+
text-align: left; }
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
.luxbar-hamburger {
|
396
|
+
|
397
|
+
display: none; }
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
.luxbar-checkbox:not(:checked) ~ .luxbar-menu {
|
402
|
+
|
403
|
+
overflow: visible; }
|
404
|
+
|
405
|
+
.luxbar-checkbox:checked ~ .luxbar-menu {
|
406
|
+
|
407
|
+
height: 58px; }
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
.luxbar-menu .luxbar-item {
|
412
|
+
|
413
|
+
border-top: 0; }
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
.luxbar-menu-right .luxbar-header {
|
418
|
+
|
419
|
+
margin-right: auto; }
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
.dropdown {
|
424
|
+
|
425
|
+
height: 58px; }
|
426
|
+
|
427
|
+
.dropdown:hover > ul {
|
428
|
+
|
429
|
+
position: absolute;
|
430
|
+
|
431
|
+
left: 0;
|
432
|
+
|
433
|
+
top: 58px;
|
434
|
+
|
435
|
+
padding: 0; }
|
436
|
+
|
437
|
+
.dropdown > ul {
|
438
|
+
|
439
|
+
display: none; }
|
440
|
+
|
441
|
+
.dropdown > ul .luxbar-item {
|
442
|
+
|
443
|
+
padding: 5px 10px; }
|
444
|
+
|
445
|
+
.dropdown > ul .luxbar-item a {
|
446
|
+
|
447
|
+
white-space: nowrap; } }
|
448
|
+
|
449
|
+
.luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-doublespin span::before {
|
450
|
+
|
451
|
+
transform: rotate(225deg); }
|
452
|
+
|
453
|
+
.luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-doublespin span::after {
|
454
|
+
|
455
|
+
transform: rotate(-225deg); }
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
.luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-spin span::before {
|
460
|
+
|
461
|
+
transform: rotate(45deg); }
|
462
|
+
|
463
|
+
.luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-spin span::after {
|
464
|
+
|
465
|
+
transform: rotate(-45deg); }
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
/******* color variables *******/
|
470
|
+
|
471
|
+
/******* default dark *******/
|
472
|
+
|
473
|
+
.luxbar-menu-dark,
|
474
|
+
|
475
|
+
.luxbar-menu-dark .dropdown ul {
|
476
|
+
|
477
|
+
background-color: rgba(0,0,0,0.5);
|
478
|
+
|
479
|
+
color: #fff;
|
480
|
+
|
481
|
+
}
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
.luxbar-menu-dark .active,
|
486
|
+
|
487
|
+
.luxbar-menu-dark .luxbar-item:hover {
|
488
|
+
|
489
|
+
color: #a2b4b7;}
|
490
|
+
|
491
|
+
.luxbar-menu-dark .luxbar-hamburger span,
|
492
|
+
|
493
|
+
.luxbar-menu-dark .luxbar-hamburger span::before,
|
494
|
+
|
495
|
+
.luxbar-menu-dark .luxbar-hamburger span::after {
|
496
|
+
|
497
|
+
background-color: #fff; }
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
```
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
CSSのみで作成されたレスポンシブ対応のナビゲーションでしたので、jsなどはありませんでした。
|