質問編集履歴

5

追記

2020/01/23 05:26

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -524,12 +524,6 @@
524
524
 
525
525
  ```
526
526
 
527
- となってしまい少しだけ動いてしまします。このjsが悪さをしていのか、なんの為の処理なのかご教授していただきたいです。
527
+ となってしまい少しだけ動いてしまします。これは公式ライブラリの一瞬ズームする為の処理なのでしょう
528
-
529
- また、一応スクロールはとまりましたが、ヘッダーに処理を入れている為、classを分けていた故、
528
+
530
-
531
- 上記他にも、止める方法あれば助けていただいです。
529
+ ご教授していただら助かります。
532
-
533
-
534
-
535
- *Chromeのモバイルエミュレーターでは一応スクロールはとまりましたが、実機ではスクロール&ガタガタしてしまっていました。

4

追記

2020/01/23 05:26

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -529,3 +529,7 @@
529
529
  また、一応スクロールはとまりましたが、ヘッダーに処理を入れている為、classを分けていた故、
530
530
 
531
531
  上記他にも、止める方法あれば助けていただきたいです。
532
+
533
+
534
+
535
+ *Chromeのモバイルエミュレーターでは一応スクロールはとまりましたが、実機ではスクロール&ガタガタしてしまっていました。

3

追記

2020/01/23 05:10

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -495,3 +495,37 @@
495
495
  TOP以外のページでは、メニュー開閉にかかわらずロゴ画像をその位置に置いているので,
496
496
 
497
497
  アニメーションを止めて実装していますので、fatNav.css全文も載せています。
498
+
499
+
500
+
501
+ ###追記
502
+
503
+ ```
504
+
505
+ <header class="main-header fat-nav">
506
+
507
+ <nav id="menu" class="page-nav fat-nav__wrapper">
508
+
509
+ ```
510
+
511
+ 公式通り上記のようにすることで一応スクロールはとまりましたが
512
+
513
+ nav部分が下記のようになってしまい。
514
+
515
+ ```
516
+
517
+ element.style {
518
+
519
+ height: 110%;
520
+
521
+ transform: translateY(-5%);
522
+
523
+ }
524
+
525
+ ```
526
+
527
+ となってしまい少しだけ動いてしまします。どこのjsが悪さをしているのか、なんの為の処理なのかご教授していただきたいです。
528
+
529
+ また、一応スクロールはとまりましたが、ヘッダーに処理を入れている為、classを分けていた故、
530
+
531
+ 上記他にも、止める方法あれば助けていただきたいです。

2

修正

2020/01/23 04:40

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -424,14 +424,6 @@
424
424
 
425
425
  table-layout: fixed;
426
426
 
427
- position: fixed;
428
-
429
- z-index: -1;
430
-
431
- width: 100%;
432
-
433
- height: 100%;
434
-
435
427
  }
436
428
 
437
429
 

1

修正

2020/01/23 04:13

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -110,7 +110,7 @@
110
110
 
111
111
 
112
112
 
113
- ```CSS fatNav.css
113
+ ```CSS
114
114
 
115
115
 
116
116
 
@@ -134,143 +134,347 @@
134
134
 
135
135
 
136
136
 
137
- header nav {
137
+ header ul {
138
+
138
-
139
+ display: flex;
140
+
141
+ }
142
+
143
+
144
+
145
+ header li {
146
+
147
+ margin: 64px 42px;
148
+
149
+ }
150
+
151
+
152
+
153
+ .main-visual {
154
+
155
+ background-color: #888;
156
+
139
- width: 100%;
157
+ width: 100%;
158
+
159
+ height: 100vh;
160
+
161
+ display: table;
162
+
163
+ z-index: -1;
164
+
165
+ }
166
+
167
+
168
+
169
+ .main-img {
170
+
171
+ position: relative;
172
+
173
+ display: table-cell;
140
174
 
141
175
  text-align: center;
142
176
 
143
- }
144
-
145
-
146
-
147
- header ul {
148
-
149
- display: flex;
150
-
151
- overflow: hidden;
152
-
153
- }
154
-
155
-
156
-
157
- header li {
158
-
159
- margin: 64px 42px;
160
-
161
- }
162
-
163
-
164
-
165
- .main-visual {
166
-
167
- background-color: #888;
168
-
169
- width: 100%;
170
-
171
- height: 100vh;
177
+ vertical-align: middle;
178
+
179
+ width: 100%;
180
+
181
+ }
182
+
183
+
184
+
185
+ .main-img img {
186
+
187
+ width: 550px;
188
+
189
+ }
190
+
191
+
192
+
193
+ .container {
194
+
195
+ width: 100%;
196
+
197
+ height: 800px;
198
+
199
+ }
200
+
201
+
202
+
203
+ .main-header img{
204
+
205
+ position: absolute;
206
+
207
+ top: 40px;
208
+
209
+ left: 0;
210
+
211
+ height: 60px;
212
+
213
+ display: none;
214
+
215
+ }
216
+
217
+
218
+
219
+
220
+
221
+ @media (max-width: 767px) {
222
+
223
+
224
+
225
+ .main-img img {
226
+
227
+ width: 270px;
228
+
229
+ }
230
+
231
+
232
+
233
+ .main-header img{
234
+
235
+ display: block;
236
+
237
+ top: 14px;
238
+
239
+ left: 14px;
240
+
241
+ height: 35px;
242
+
243
+ }
244
+
245
+
246
+
247
+ .iPhone .main-header img{
248
+
249
+ max-width:125.7px!important;
250
+
251
+ max-height: 35px!important;
252
+
253
+ }
254
+
255
+ .iPhone .sub-header h3 {
256
+
257
+ max-height: 25px!important;
258
+
259
+ }
260
+
261
+
262
+
263
+ }
264
+
265
+ ```
266
+
267
+
268
+
269
+ ```fatNavcss
270
+
271
+ @media (max-width: 767px) {
272
+
273
+
274
+
275
+ .hamburger {
276
+
277
+ display: block;
278
+
279
+ width: 50px;
280
+
281
+ height: 50px;
282
+
283
+ position: fixed;
284
+
285
+ top: 7px;
286
+
287
+ right: 15px;
288
+
289
+ z-index: 10000;
290
+
291
+ padding: 12px;
292
+
293
+ box-sizing: border-box;
294
+
295
+ touch-action: manipulation;
296
+
297
+ }
298
+
299
+ .hamburger__icon {
300
+
301
+ position: relative;
302
+
303
+ margin-top: 8px;
304
+
305
+ margin-bottom: 8px;
306
+
307
+ }
308
+
309
+ .hamburger__icon, .hamburger__icon:before, .hamburger__icon:after {
310
+
311
+ display: block;
312
+
313
+ width: 26px;
314
+
315
+ height: 3px;
316
+
317
+ background-color: #aaaaaa;
318
+
319
+ border-radius: 4px;
320
+
321
+ transition-property: background-color, transform;
322
+
323
+ transition-duration: 0.4s;
324
+
325
+ }
326
+
327
+ .hamburger__icon:before, .hamburger__icon:after {
328
+
329
+ position: absolute;
330
+
331
+ content: "";
332
+
333
+ }
334
+
335
+ .hamburger__icon:before {
336
+
337
+ top: -8px;
338
+
339
+ }
340
+
341
+ .hamburger__icon:after {
342
+
343
+ top: 8px;
344
+
345
+ }
346
+
347
+ .hamburger.active .hamburger__icon {
348
+
349
+ background-color: transparent;
350
+
351
+ }
352
+
353
+ .sub .hamburger.active .hamburger__icon:before,.sub .hamburger.active .hamburger__icon:after {
354
+
355
+ background-color: #fff;
356
+
357
+ }
358
+
359
+
360
+
361
+ .hamburger.active .hamburger__icon:before {
362
+
363
+ transform: translateY(8px) rotate(45deg);
364
+
365
+ }
366
+
367
+ .hamburger.active .hamburger__icon:after {
368
+
369
+ transform: translateY(-8px) rotate(-45deg);
370
+
371
+ }
372
+
373
+
374
+
375
+ .fat-nav {
376
+
377
+ top: 0;
378
+
379
+ left: 0;
380
+
381
+ z-index: 9999;
382
+
383
+ position: fixed;
384
+
385
+ display: none;
386
+
387
+ width: 100%;
388
+
389
+ height: 100%;
390
+
391
+ overflow-y: auto;
392
+
393
+ overflow-x: hidden;
394
+
395
+
396
+
397
+ }
398
+
399
+ .main-header .fat-nav{
400
+
401
+ background: rgba(255, 255, 255, 0.91);
402
+
403
+ color: #a9a9a9!important;
404
+
405
+ }
406
+
407
+ .main-header .fat-nav li a,
408
+
409
+ .main-header .fat-nav li{
410
+
411
+ color: #a9a9a9!important;
412
+
413
+ }
414
+
415
+
416
+
417
+ .fat-nav__wrapper {
418
+
419
+ width: 100%;
420
+
421
+ height: 100%;
172
422
 
173
423
  display: table;
174
424
 
425
+ table-layout: fixed;
426
+
427
+ position: fixed;
428
+
175
429
  z-index: -1;
176
430
 
431
+ width: 100%;
432
+
433
+ height: 100%;
434
+
177
- }
435
+ }
178
-
179
-
180
-
436
+
437
+
438
+
181
- .main-img {
439
+ .fat-nav ul {
182
-
183
- position: relative;
184
440
 
185
441
  display: table-cell;
186
442
 
443
+ vertical-align: middle;
444
+
445
+ margin: 0;
446
+
447
+ padding: 0;
448
+
449
+ }
450
+
451
+ .fat-nav li {
452
+
453
+ list-style-type: none;
454
+
187
455
  text-align: center;
188
456
 
189
- vertical-align: middle;
190
-
191
- width: 100%;
457
+ padding: 10px;
458
+
192
-
459
+ font-size: 2em;
460
+
461
+ margin: auto;
462
+
463
+ transition: .6s 0.2s;
464
+
193
- }
465
+ }
194
-
195
-
196
-
466
+
197
- .main-img img {
467
+ .fat-nav li, .fat-nav li a {
198
-
468
+
199
- width: 550px;
469
+ color: #ddd;
200
-
470
+
201
- }
471
+ }
202
-
203
-
204
-
472
+
205
- .container {
473
+ .fat-nav li a {
206
-
474
+
207
- width: 100%;
475
+ text-decoration: none;
208
-
209
- height: 800px;
476
+
210
-
211
- }
477
+ }
212
-
213
-
214
-
215
- .main-header img{
216
-
217
- position: absolute;
218
-
219
- top: 40px;
220
-
221
- left: 0;
222
-
223
- height: 60px;
224
-
225
- display: none;
226
-
227
- }
228
-
229
-
230
-
231
-
232
-
233
- @media (max-width: 767px) {
234
-
235
-
236
-
237
- .main-img img {
238
-
239
- width: 270px;
240
-
241
- }
242
-
243
-
244
-
245
- .main-header img{
246
-
247
- display: block;
248
-
249
- top: 14px;
250
-
251
- left: 14px;
252
-
253
- height: 35px;
254
-
255
- }
256
-
257
-
258
-
259
- .iPhone .main-header img{
260
-
261
- max-width:125.7px!important;
262
-
263
- max-height: 35px!important;
264
-
265
- }
266
-
267
- .iPhone .sub-header h3 {
268
-
269
- max-height: 25px!important;
270
-
271
- }
272
-
273
-
274
478
 
275
479
  }
276
480
 
@@ -278,230 +482,14 @@
278
482
 
279
483
 
280
484
 
281
- ```fatNavcss
282
-
283
- @media (max-width: 767px) {
284
-
285
-
286
-
287
- .hamburger {
288
-
289
- display: block;
290
-
291
- width: 50px;
292
-
293
- height: 50px;
294
-
295
- position: fixed;
296
-
297
- top: 7px;
298
-
299
- right: 15px;
300
-
301
- z-index: 10000;
302
-
303
- padding: 12px;
304
-
305
- box-sizing: border-box;
306
-
307
- touch-action: manipulation;
308
-
309
- }
310
-
311
- .hamburger__icon {
312
-
313
- position: relative;
314
-
315
- margin-top: 8px;
316
-
317
- margin-bottom: 8px;
318
-
319
- }
320
-
321
- .hamburger__icon, .hamburger__icon:before, .hamburger__icon:after {
322
-
323
- display: block;
324
-
325
- width: 26px;
326
-
327
- height: 3px;
328
-
329
- background-color: #aaaaaa;
330
-
331
- border-radius: 4px;
332
-
333
- transition-property: background-color, transform;
334
-
335
- transition-duration: 0.4s;
336
-
337
- }
338
-
339
- .hamburger__icon:before, .hamburger__icon:after {
340
-
341
- position: absolute;
342
-
343
- content: "";
344
-
345
- }
346
-
347
- .hamburger__icon:before {
348
-
349
- top: -8px;
350
-
351
- }
352
-
353
- .hamburger__icon:after {
354
-
355
- top: 8px;
356
-
357
- }
358
-
359
- .hamburger.active .hamburger__icon {
360
-
361
- background-color: transparent;
362
-
363
- }
364
-
365
- .sub .hamburger.active .hamburger__icon:before,.sub .hamburger.active .hamburger__icon:after {
366
-
367
- background-color: #fff;
368
-
369
- }
370
-
371
-
372
-
373
- .hamburger.active .hamburger__icon:before {
374
-
375
- transform: translateY(8px) rotate(45deg);
376
-
377
- }
378
-
379
- .hamburger.active .hamburger__icon:after {
380
-
381
- transform: translateY(-8px) rotate(-45deg);
382
-
383
- }
384
-
385
-
386
-
387
- .fat-nav {
388
-
389
- top: 0;
390
-
391
- left: 0;
392
-
393
- z-index: 9999;
394
-
395
- position: fixed;
396
-
397
- display: none;
398
-
399
- width: 100%;
400
-
401
- height: 100%;
402
-
403
- overflow-y: auto;
404
-
405
- overflow-x: hidden;
406
-
407
-
408
-
409
- }
410
-
411
- .main-header .fat-nav{
412
-
413
- background: rgba(255, 255, 255, 0.91);
414
-
415
- color: #a9a9a9!important;
416
-
417
- }
418
-
419
- .main-header .fat-nav li a,
420
-
421
- .main-header .fat-nav li{
422
-
423
- color: #a9a9a9!important;
424
-
425
- }
426
-
427
-
428
-
429
- .fat-nav__wrapper {
430
-
431
- width: 100%;
432
-
433
- height: 100%;
434
-
435
- display: table;
436
-
437
- table-layout: fixed;
438
-
439
- position: fixed;
440
-
441
- z-index: -1;
442
-
443
- width: 100%;
444
-
445
- height: 100%;
446
-
447
- }
448
-
449
-
450
-
451
- .fat-nav ul {
452
-
453
- display: table-cell;
454
-
455
- vertical-align: middle;
456
-
457
- margin: 0;
458
-
459
- padding: 0;
460
-
461
- }
462
-
463
- .fat-nav li {
464
-
465
- list-style-type: none;
466
-
467
- text-align: center;
468
-
469
- padding: 10px;
470
-
471
- font-size: 2em;
472
-
473
- margin: auto;
474
-
475
- transition: .6s 0.2s;
476
-
477
- }
478
-
479
- .fat-nav li, .fat-nav li a {
480
-
481
- color: #ddd;
482
-
483
- }
484
-
485
- .fat-nav li a {
486
-
487
- text-decoration: none;
488
-
489
- }
490
-
491
- }
485
+ ```fatNavjs
486
+
487
+ !function(a,b,c){function d(b){this.settings=a.extend({},f,b),this._defaults=f,this._name=e,this.init()}var e="fatNav",f={};a.extend(d.prototype,{init:function(){var b=this,c=this.$nav=a(".fat-nav"),d=this.$hamburger=a('<a href="javascript:void(0)" class="hamburger"><div class="hamburger__icon"></div></a>');this._bodyOverflow=a("body").css("overflow"),navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&c.children().css({height:"110%",transform:"translateY(-5%)"}),a("body").append(d),a().add(d).add(c.find("a")).on("click",function(a){b.toggleNav()})},toggleNav:function(){var b=this;this.$nav.fadeToggle(400),b.toggleBodyOverflow(),a().add(this.$hamburger).add(this.$nav).toggleClass("active")},toggleBodyOverflow:function(){var b=this,c=a("body");c.toggleClass("no-scroll");var d=c.hasClass("no-scroll");c.css("overflow",d?"hidden":b._bodyOverflow)}}),"undefined"==typeof a[e]&&(a[e]=function(a){return new d(this,a)})}(jQuery,window,document);
492
488
 
493
489
  ```
494
490
 
495
491
 
496
492
 
497
- ```fatNavjs
498
-
499
- !function(a,b,c){function d(b){this.settings=a.extend({},f,b),this._defaults=f,this._name=e,this.init()}var e="fatNav",f={};a.extend(d.prototype,{init:function(){var b=this,c=this.$nav=a(".fat-nav"),d=this.$hamburger=a('<a href="javascript:void(0)" class="hamburger"><div class="hamburger__icon"></div></a>');this._bodyOverflow=a("body").css("overflow"),navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&c.children().css({height:"110%",transform:"translateY(-5%)"}),a("body").append(d),a().add(d).add(c.find("a")).on("click",function(a){b.toggleNav()})},toggleNav:function(){var b=this;this.$nav.fadeToggle(400),b.toggleBodyOverflow(),a().add(this.$hamburger).add(this.$nav).toggleClass("active")},toggleBodyOverflow:function(){var b=this,c=a("body");c.toggleClass("no-scroll");var d=c.hasClass("no-scroll");c.css("overflow",d?"hidden":b._bodyOverflow)}}),"undefined"==typeof a[e]&&(a[e]=function(a){return new d(this,a)})}(jQuery,window,document);
500
-
501
- ```
502
-
503
-
504
-
505
493
  ###
506
494
 
507
495
  色々スクロール止める方法書いてあったのですが、