質問編集履歴
1
質問内容の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
画面が
|
1
|
+
画面を広げるとハンバーガーメニューが右にはみ出てしまう
|
test
CHANGED
@@ -2,13 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
画面を
|
5
|
+
画面を広げてもハンバーガーメニューがはみ出さないようにしたい。
|
6
|
-
|
7
|
-
htmlとbodyに`overflow: hidden;`を指定しているからか、スクロールができません。
|
8
|
-
|
9
|
-
レスポンシブで右に余白ができるので`overflow: hidden;`は置いておきたいと思っています。
|
10
|
-
|
11
|
-
|
12
6
|
|
13
7
|
|
14
8
|
|
@@ -16,27 +10,145 @@
|
|
16
10
|
|
17
11
|
|
18
12
|
|
13
|
+
```html
|
14
|
+
|
15
|
+
<header class="header">
|
16
|
+
|
17
|
+
<div class="header_logo">
|
18
|
+
|
19
|
+
<a href="">
|
20
|
+
|
21
|
+
<img src="img/logo.jpg" alt="Engress">
|
22
|
+
|
23
|
+
</a>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<nav class="header_nav">
|
28
|
+
|
29
|
+
<div class="ham"><a href=""><span class="ham-line ham-line1"></span><span class="ham-line ham-line2"></span><span
|
30
|
+
|
31
|
+
class="ham-line ham-line3"></span></a></div>
|
32
|
+
|
33
|
+
<ul class="header_list">
|
34
|
+
|
35
|
+
<li class="header_list-item"><a href="" class="p">ホーム</a></li>
|
36
|
+
|
37
|
+
<li class="header_list-item"><a href="" class="p">お知らせ</a></li>
|
38
|
+
|
39
|
+
<li class="header_list-item"><a href="" class="p">ブログ</a></li>
|
40
|
+
|
41
|
+
<li class="header_list-item"><a href="" class="p">コース・料金</a></li>
|
42
|
+
|
43
|
+
</ul>
|
44
|
+
|
45
|
+
<div class="header_right">
|
46
|
+
|
47
|
+
<div class="tel-box">
|
48
|
+
|
49
|
+
<small class="tel-hour">平日08:00〜20:00</small>
|
50
|
+
|
51
|
+
<p class="tel-number"><a href="tel:0123-456-7890" class="p">0123-456-7890</a></p>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<a href="">
|
56
|
+
|
57
|
+
<div class="square-request-btn">
|
58
|
+
|
59
|
+
<span class="square-request-btn-text">
|
60
|
+
|
61
|
+
資料請求
|
62
|
+
|
63
|
+
</span>
|
64
|
+
|
65
|
+
</div>
|
66
|
+
|
67
|
+
</a>
|
68
|
+
|
69
|
+
<a href="">
|
70
|
+
|
71
|
+
<div class="contact-btn header-btn">
|
72
|
+
|
73
|
+
<span class="contact-btn-text">
|
74
|
+
|
75
|
+
お問い合わせ
|
76
|
+
|
77
|
+
</span>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</a>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</nav>
|
86
|
+
|
87
|
+
</header>
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
|
19
93
|
```scss
|
20
94
|
|
21
95
|
//style.scss
|
22
96
|
|
23
97
|
|
24
98
|
|
25
|
-
html {
|
26
|
-
|
27
|
-
font-size: 62.5%;
|
28
|
-
|
29
|
-
|
99
|
+
$bpc: 1600px; //PC大画面
|
100
|
+
|
30
|
-
|
101
|
+
$spc: 1280px; // PC通常
|
102
|
+
|
103
|
+
$ipad: 768px; // iPad
|
104
|
+
|
105
|
+
$sp: 375px; // スマホ
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
@mixin sp {
|
110
|
+
|
111
|
+
@media screen and (min-width: $sp) {
|
112
|
+
|
31
|
-
o
|
113
|
+
@content;
|
32
|
-
|
114
|
+
|
33
|
-
}
|
115
|
+
}
|
34
|
-
|
35
|
-
|
36
|
-
|
116
|
+
|
37
|
-
|
117
|
+
}
|
38
|
-
|
118
|
+
|
119
|
+
|
120
|
+
|
39
|
-
|
121
|
+
@mixin ipad {
|
122
|
+
|
123
|
+
@media screen and (min-width: $ipad) {
|
124
|
+
|
125
|
+
@content;
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
@mixin spc {
|
134
|
+
|
135
|
+
@media screen and (min-width: $spc) {
|
136
|
+
|
137
|
+
@content;
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
@mixin bpc {
|
146
|
+
|
147
|
+
@media screen and (min-width: $bpc) {
|
148
|
+
|
149
|
+
@content;
|
150
|
+
|
151
|
+
}
|
40
152
|
|
41
153
|
}
|
42
154
|
|
@@ -48,39 +160,379 @@
|
|
48
160
|
|
49
161
|
|
50
162
|
|
51
|
-
.hero_bg-img {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
163
|
+
@charset "utf-8";
|
56
|
-
|
164
|
+
|
165
|
+
|
166
|
+
|
57
|
-
|
167
|
+
@import 'style.scss';
|
58
|
-
|
59
|
-
|
168
|
+
|
60
|
-
|
61
|
-
|
169
|
+
|
62
|
-
|
63
|
-
|
170
|
+
|
64
|
-
|
65
|
-
|
171
|
+
.header {
|
66
172
|
|
67
173
|
display: flex;
|
68
174
|
|
175
|
+
align-items: center;
|
176
|
+
|
177
|
+
height: 5rem;
|
178
|
+
|
179
|
+
max-width: 100%;
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
@include ipad {
|
184
|
+
|
185
|
+
height: 8rem;
|
186
|
+
|
187
|
+
}
|
188
|
+
|
189
|
+
}
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
.header_logo {
|
194
|
+
|
195
|
+
margin: auto 0;
|
196
|
+
|
197
|
+
margin-left: .5rem;
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
@include ipad {
|
202
|
+
|
203
|
+
margin-left: 1.5rem;
|
204
|
+
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
a {
|
210
|
+
|
211
|
+
img {
|
212
|
+
|
213
|
+
width: 10rem;
|
214
|
+
|
215
|
+
height: auto;
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
@include spc {
|
220
|
+
|
221
|
+
width: 13.6rem;
|
222
|
+
|
223
|
+
height: 2.7rem;
|
224
|
+
|
225
|
+
}
|
226
|
+
|
227
|
+
}
|
228
|
+
|
229
|
+
}
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
.header_nav {
|
236
|
+
|
237
|
+
margin-left: auto;
|
238
|
+
|
239
|
+
display: flex;
|
240
|
+
|
241
|
+
align-items: center;
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
@include spc {
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
width: 100%;
|
250
|
+
|
251
|
+
align-items: center;
|
252
|
+
|
253
|
+
margin-left: .2rem;
|
254
|
+
|
255
|
+
}
|
256
|
+
|
257
|
+
}
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
.ham {
|
262
|
+
|
263
|
+
width: 4em;
|
264
|
+
|
265
|
+
height: 4em;
|
266
|
+
|
267
|
+
cursor: pointer;
|
268
|
+
|
269
|
+
position: relative;
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
@include spc {
|
274
|
+
|
275
|
+
display: none;
|
276
|
+
|
277
|
+
}
|
278
|
+
|
279
|
+
}
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
.ham-line {
|
284
|
+
|
285
|
+
position: absolute;
|
286
|
+
|
287
|
+
left: 1em;
|
288
|
+
|
289
|
+
width: 2em;
|
290
|
+
|
291
|
+
height: 0.2em;
|
292
|
+
|
293
|
+
background-color: $navyBlue;
|
294
|
+
|
295
|
+
transition: all 0.3s;
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
.ham-line1 {
|
302
|
+
|
303
|
+
top: 1em;
|
304
|
+
|
305
|
+
}
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
.ham-line1.open {
|
310
|
+
|
311
|
+
transform: rotate(45deg);
|
312
|
+
|
313
|
+
top: 2em;
|
314
|
+
|
315
|
+
}
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
.ham-line2 {
|
320
|
+
|
321
|
+
top: 1.8em;
|
322
|
+
|
323
|
+
}
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
.ham-line2.open {
|
328
|
+
|
329
|
+
width: 0;
|
330
|
+
|
331
|
+
}
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
.ham-line3 {
|
336
|
+
|
337
|
+
top: 2.6em;
|
338
|
+
|
339
|
+
}
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
.ham-line3.open {
|
344
|
+
|
345
|
+
transform: rotate(-45deg);
|
346
|
+
|
347
|
+
top: 2em;
|
348
|
+
|
349
|
+
}
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
.header_list {
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
@include spc {
|
360
|
+
|
361
|
+
display: flex;
|
362
|
+
|
363
|
+
}
|
364
|
+
|
365
|
+
}
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
.header_list-item {
|
370
|
+
|
371
|
+
display: none;
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
@include spc {
|
376
|
+
|
377
|
+
display: block;
|
378
|
+
|
379
|
+
margin-left: 2.8rem;
|
380
|
+
|
381
|
+
font-weight: bold;
|
382
|
+
|
383
|
+
line-height: 1.8;
|
384
|
+
|
385
|
+
}
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
a {
|
390
|
+
|
391
|
+
color: $navyBlue;
|
392
|
+
|
393
|
+
}
|
394
|
+
|
395
|
+
}
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
.header_right {
|
400
|
+
|
401
|
+
display: none;
|
402
|
+
|
403
|
+
margin-left: auto;
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
@include spc {
|
408
|
+
|
409
|
+
display: flex;
|
410
|
+
|
411
|
+
}
|
412
|
+
|
413
|
+
}
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
.tel-box {
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
@include spc {
|
422
|
+
|
423
|
+
margin-right: 1.4rem;
|
424
|
+
|
425
|
+
}
|
426
|
+
|
427
|
+
}
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
.tel-hour {
|
432
|
+
|
433
|
+
color: $navyBlue;
|
434
|
+
|
435
|
+
}
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
.tel-number {
|
440
|
+
|
441
|
+
a {
|
442
|
+
|
443
|
+
color: $navyBlue;
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
@include spc {
|
448
|
+
|
449
|
+
font-weight: bold;
|
450
|
+
|
451
|
+
}
|
452
|
+
|
453
|
+
}
|
454
|
+
|
455
|
+
}
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
.square-request-btn {
|
460
|
+
|
461
|
+
font-size: 1.4rem;
|
462
|
+
|
463
|
+
line-height: 1.7;
|
464
|
+
|
465
|
+
font-weight: bold;
|
466
|
+
|
467
|
+
height: 5rem;
|
468
|
+
|
469
|
+
margin-right: 1rem;
|
470
|
+
|
471
|
+
width: 14rem;
|
472
|
+
|
473
|
+
border-radius: .5rem;
|
474
|
+
|
475
|
+
background-color: $yellowOrange;
|
476
|
+
|
477
|
+
width: 10rem;
|
478
|
+
|
479
|
+
display: none;
|
480
|
+
|
69
481
|
justify-content: center;
|
70
482
|
|
71
483
|
align-items: center;
|
72
484
|
|
73
|
-
|
485
|
+
color: $white;
|
74
|
-
|
486
|
+
|
487
|
+
|
488
|
+
|
75
|
-
@include spc {
|
489
|
+
@include spc {
|
76
|
-
|
77
|
-
|
78
|
-
|
490
|
+
|
79
|
-
|
491
|
+
display: flex;
|
80
|
-
|
492
|
+
|
81
|
-
}
|
493
|
+
}
|
82
|
-
|
494
|
+
|
83
|
-
}
|
495
|
+
}
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
.contact-btn {
|
500
|
+
|
501
|
+
font-size: 1.4rem;
|
502
|
+
|
503
|
+
font-weight: bold;
|
504
|
+
|
505
|
+
line-height: 1.7;
|
506
|
+
|
507
|
+
height: 5rem;
|
508
|
+
|
509
|
+
width: 13.7rem;
|
510
|
+
|
511
|
+
border-radius: .5rem;
|
512
|
+
|
513
|
+
margin-right: 1rem;
|
514
|
+
|
515
|
+
background-color: $navyBlue;
|
516
|
+
|
517
|
+
display: none;
|
518
|
+
|
519
|
+
justify-content: center;
|
520
|
+
|
521
|
+
align-items: center;
|
522
|
+
|
523
|
+
color: $white;
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
@include spc {
|
528
|
+
|
529
|
+
display: flex;
|
530
|
+
|
531
|
+
}
|
532
|
+
|
533
|
+
}
|
534
|
+
|
535
|
+
|
84
536
|
|
85
537
|
```
|
86
538
|
|