質問編集履歴
5
コードを最新にしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -386,167 +386,139 @@
|
|
386
386
|
|
387
387
|
|
388
388
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
{
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
li
|
410
|
-
|
411
|
-
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
@media screen and (max-width: 767px) {
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
.slick-slide img{
|
402
|
+
|
403
|
+
margin-top: 62px;
|
404
|
+
|
405
|
+
}
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
.slick-next{
|
410
|
+
|
411
|
+
display: none!important;
|
412
|
+
|
413
|
+
}
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
.slick-prev{
|
418
|
+
|
419
|
+
display: none!important;
|
420
|
+
|
421
|
+
}
|
422
|
+
|
423
|
+
}
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
.progress-bars {
|
442
|
+
|
443
|
+
position: absolute;
|
444
|
+
|
445
|
+
top: 80%;
|
446
|
+
|
447
|
+
left: 0;
|
448
|
+
|
449
|
+
right: 0;
|
450
|
+
|
451
|
+
overflow: hidden;
|
452
|
+
|
453
|
+
width: 100%;
|
454
|
+
|
455
|
+
max-width: 1200px;
|
456
|
+
|
457
|
+
margin: 0 auto;
|
458
|
+
|
459
|
+
display: flex;
|
460
|
+
|
461
|
+
padding-bottom: 10px;
|
462
|
+
|
463
|
+
}
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
.progress-bar-box {
|
468
|
+
|
469
|
+
height: 2px;
|
470
|
+
|
471
|
+
width: 25%;
|
472
|
+
|
473
|
+
margin: 10px;
|
474
|
+
|
475
|
+
font-size: 1.2rem;
|
476
|
+
|
477
|
+
font-weight: bold;
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
span{
|
482
|
+
|
483
|
+
display: block!important;
|
484
|
+
|
485
|
+
margin-top: 10px;
|
486
|
+
|
487
|
+
}
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
}
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
.progress-bar-box:nth-child(even) {
|
496
|
+
|
497
|
+
background-color: #aaa;
|
412
498
|
|
413
499
|
}
|
414
500
|
|
501
|
+
|
502
|
+
|
415
|
-
.sl
|
503
|
+
.progress-bar-box:nth-child(odd) {
|
416
|
-
|
417
|
-
|
504
|
+
|
418
|
-
|
419
|
-
|
505
|
+
background-color: #aaa;
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
display: inline-block;
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
width: 20px;
|
428
|
-
|
429
|
-
height: 20px;
|
430
|
-
|
431
|
-
margin: 0 5px;
|
432
|
-
|
433
|
-
padding: 0;
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
cursor: pointer;
|
438
506
|
|
439
507
|
}
|
440
508
|
|
441
|
-
|
509
|
+
|
442
|
-
|
443
|
-
|
510
|
+
|
444
|
-
|
511
|
+
|
512
|
+
|
445
|
-
|
513
|
+
.bar {
|
446
|
-
|
514
|
+
|
447
|
-
|
515
|
+
height: 100%;
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
516
|
+
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
width:
|
517
|
+
width: 0px;
|
456
|
-
|
457
|
-
|
518
|
+
|
458
|
-
|
459
|
-
padding: 5px;
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
cursor: pointer;
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
color: transparent;
|
468
|
-
|
469
|
-
border: 0;
|
470
|
-
|
471
|
-
outline: none;
|
472
|
-
|
473
|
-
background: transparent;
|
474
|
-
|
475
|
-
}
|
519
|
+
}
|
476
|
-
|
477
|
-
|
520
|
+
|
478
|
-
|
479
|
-
|
521
|
+
|
480
|
-
|
481
|
-
{
|
482
|
-
|
483
|
-
outline: none;
|
484
|
-
|
485
|
-
}
|
486
|
-
|
487
|
-
.slick-dots li button:hover:before,
|
488
|
-
|
489
|
-
.slick-dots li button:focus:before
|
490
|
-
|
491
|
-
{
|
492
|
-
|
493
|
-
opacity: 1;
|
494
|
-
|
495
|
-
}
|
496
|
-
|
497
|
-
.slick-dots li button:before
|
498
|
-
|
499
|
-
{
|
500
|
-
|
501
|
-
font-family: 'slick';
|
502
|
-
|
503
|
-
font-size: 6px;
|
504
|
-
|
505
|
-
line-height: 20px;
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
position: absolute;
|
510
|
-
|
511
|
-
top: 0;
|
512
|
-
|
513
|
-
left: 0;
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
width: 20px;
|
518
|
-
|
519
|
-
height: 20px;
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
content: '●';
|
524
|
-
|
525
|
-
text-align: center;
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
opacity: .25;
|
530
|
-
|
531
|
-
color: black;
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
-webkit-font-smoothing: antialiased;
|
536
|
-
|
537
|
-
-moz-osx-font-smoothing: grayscale;
|
538
|
-
|
539
|
-
}
|
540
|
-
|
541
|
-
.slick-dots li.slick-active button:before
|
542
|
-
|
543
|
-
{
|
544
|
-
|
545
|
-
opacity: .75;
|
546
|
-
|
547
|
-
color: black;
|
548
|
-
|
549
|
-
}
|
550
522
|
|
551
523
|
```
|
552
524
|
|
@@ -568,140 +540,76 @@
|
|
568
540
|
|
569
541
|
$(document).ready(function() {
|
570
542
|
|
543
|
+
|
544
|
+
|
545
|
+
const barColors = ['#fff', '#fff', '#fff','#fff'];
|
546
|
+
|
547
|
+
|
548
|
+
|
571
|
-
|
549
|
+
$.fn.startBar = function(index) {
|
572
|
-
|
573
|
-
|
550
|
+
|
574
|
-
|
575
|
-
$slick,
|
576
|
-
|
577
|
-
isPause,
|
578
|
-
|
579
|
-
ti
|
551
|
+
this
|
580
|
-
|
552
|
+
|
581
|
-
|
553
|
+
.eq(index)
|
554
|
+
|
582
|
-
|
555
|
+
.css({ backgroundColor: barColors[index]})
|
556
|
+
|
583
|
-
|
557
|
+
.animate({ width: '100%' }, 3400 );
|
558
|
+
|
584
|
-
|
559
|
+
}
|
560
|
+
|
561
|
+
|
562
|
+
|
585
|
-
$
|
563
|
+
$('.slider').slick({
|
586
|
-
|
564
|
+
|
587
|
-
|
565
|
+
autoplay: true,
|
588
|
-
|
566
|
+
|
589
|
-
arrows: true,
|
567
|
+
arrows: true,
|
590
|
-
|
568
|
+
|
591
|
-
dots:
|
569
|
+
dots: false,
|
592
|
-
|
570
|
+
|
593
|
-
speed:
|
571
|
+
speed: 800,
|
572
|
+
|
594
|
-
|
573
|
+
autoplaySpeed: 3000,
|
574
|
+
|
595
|
-
prevArrow: '<img src="images/slick-prev.svg" class="slide-arrow slick-prev">',
|
575
|
+
prevArrow: '<img src="images/slick-prev.svg" class="slide-arrow slick-prev">',
|
596
|
-
|
576
|
+
|
597
|
-
nextArrow: '<img src="images/slick-next.svg" class="slide-arrow slick-next">',
|
577
|
+
nextArrow: '<img src="images/slick-next.svg" class="slide-arrow slick-next">',
|
598
|
-
|
578
|
+
|
599
|
-
adaptiveHeight:
|
579
|
+
adaptiveHeight: true
|
580
|
+
|
581
|
+
}).on('afterChange', function(event, slick, currentSlide) {
|
582
|
+
|
583
|
+
if (currentSlide === 0)
|
584
|
+
|
585
|
+
$('.bar').startBar(currentSlide);
|
586
|
+
|
587
|
+
$('.bar').css({width: 0}).startBar(currentSlide);
|
588
|
+
|
589
|
+
$('.bar').css({width: 0});
|
600
590
|
|
601
591
|
});
|
602
592
|
|
603
593
|
|
604
594
|
|
605
|
-
$bar = $('.slider-progress .progress');
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
function startProgressbar() {
|
610
|
-
|
611
|
-
resetProgressbar();
|
612
|
-
|
613
|
-
percentTime = 0;
|
614
|
-
|
615
|
-
isPause = false;
|
616
|
-
|
617
|
-
tick = setInterval(interval, 30);
|
618
|
-
|
619
|
-
}
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
$bar = $('.slick-dots li').children("button");
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
$('.
|
595
|
+
$('.bar').startBar(0);
|
630
|
-
|
631
|
-
mouseenter: function() {
|
632
|
-
|
633
|
-
isPause = false;
|
634
|
-
|
635
|
-
},
|
636
|
-
|
637
|
-
mouseleave: function() {
|
638
|
-
|
639
|
-
isPause = false;
|
640
|
-
|
641
|
-
}
|
642
|
-
|
643
|
-
})
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
function startProgressbar() {
|
648
|
-
|
649
|
-
resetProgressbar();
|
650
|
-
|
651
|
-
percentTime = 0;
|
652
|
-
|
653
|
-
isPause = false;
|
654
|
-
|
655
|
-
tick = setInterval(interval, 10);
|
656
|
-
|
657
|
-
}
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
function interval() {
|
662
|
-
|
663
|
-
if(isPause === false) {
|
664
|
-
|
665
|
-
percentTime += 0.5 / (time + 0.1);
|
666
|
-
|
667
|
-
$bar.css({
|
668
|
-
|
669
|
-
width: percentTime+"%"
|
670
|
-
|
671
|
-
});
|
672
|
-
|
673
|
-
if(percentTime >= 100)
|
674
|
-
|
675
|
-
{
|
676
|
-
|
677
|
-
$slick.slick('slickNext');
|
678
|
-
|
679
|
-
startProgressbar();
|
680
|
-
|
681
|
-
}
|
682
|
-
|
683
|
-
}
|
684
|
-
|
685
|
-
}
|
686
|
-
|
687
|
-
function resetProgressbar() {
|
688
|
-
|
689
|
-
$bar.css({
|
690
|
-
|
691
|
-
width: 0+'%'
|
692
|
-
|
693
|
-
});
|
694
|
-
|
695
|
-
clearTimeout(tick);
|
696
|
-
|
697
|
-
}
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
startProgressbar();
|
702
596
|
|
703
597
|
|
704
598
|
|
705
599
|
});
|
706
600
|
|
601
|
+
|
602
|
+
|
707
603
|
```
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
### 補足
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
![イメージ説明](f793b87f549784f2f08a62e8291d8d2a.png)
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
二週目からこのようになってしまいます。
|
4
参考サイトを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,6 +24,14 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
このサイトを参考に作っています。
|
28
|
+
|
29
|
+
https://peaceday.jp/2019/
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
27
35
|
### 発生している問題・エラーメッセージ
|
28
36
|
|
29
37
|
|
3
不要なコードを削除致しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
スライダー
|
31
|
+
スライダーは正常に動いていて、エラーは出ていません。
|
32
32
|
|
33
33
|
|
34
34
|
|
2
補足を削除。補足分は解決したため。
test
CHANGED
File without changes
|
test
CHANGED
@@ -697,37 +697,3 @@
|
|
697
697
|
});
|
698
698
|
|
699
699
|
```
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
### 補足
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
デベロッパーツールをみてみると、
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
```css
|
712
|
-
|
713
|
-
.slick-dots{
|
714
|
-
|
715
|
-
position: absolute;
|
716
|
-
|
717
|
-
bottom: -25px;
|
718
|
-
|
719
|
-
padding: 0;
|
720
|
-
|
721
|
-
margin: 0;
|
722
|
-
|
723
|
-
list-style: none;
|
724
|
-
|
725
|
-
text-align: center;
|
726
|
-
|
727
|
-
}
|
728
|
-
|
729
|
-
```
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
が効いてないみたいです。。。現在追って調べ中です。
|
1
補足追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -697,3 +697,37 @@
|
|
697
697
|
});
|
698
698
|
|
699
699
|
```
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
### 補足
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
デベロッパーツールをみてみると、
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
```css
|
712
|
+
|
713
|
+
.slick-dots{
|
714
|
+
|
715
|
+
position: absolute;
|
716
|
+
|
717
|
+
bottom: -25px;
|
718
|
+
|
719
|
+
padding: 0;
|
720
|
+
|
721
|
+
margin: 0;
|
722
|
+
|
723
|
+
list-style: none;
|
724
|
+
|
725
|
+
text-align: center;
|
726
|
+
|
727
|
+
}
|
728
|
+
|
729
|
+
```
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
が効いてないみたいです。。。現在追って調べ中です。
|