問題はタイトルの通りです。白い線が出ないように画像等でいっぱいにしたいのですが、少しだけ線が残って見栄えが少し悪いです。
html
1 <!-- main --> 2 <div class="main"> 3 <div class="swiper-container"> 4 <div class="swiper-wrapper"> 5 <div class="swiper-slide swiper-slide-0"><img src="img/mainvisual/mainvisual.png" alt=""></div> 6 <div class="swiper-slide swiper-slide-1"><video src="https://haniwaman.com/wp-content/uploads/2018/05/swiper5.mp4" loop muted></video></div> 7 <div class="swiper-slide swiper-slide-2"><img src="../img/price-img/price-img.png" alt=""></div> 8 </div> 9 <div class="swiper-pagination"></div> 10 <div class="swiper-button-prev"></div> 11 <div class="swiper-button-next"></div> 12 </div> 13 <div class="inner"> 14 <h1>一番伝えたい<br class="h-br">ことを書く</h1> 15 <h3>リードリードリード</h3> 16 <a class="a" href="#contact">お問い合わせ</a> 17 </div> 18 </div> 19
scss
1// js 2.swiper-container { 3 position: relative; 4 img, video { 5 width: 100%; 6 height: 100vh; 7 } 8 .swiper-button-prev, 9 .swiper-button-next { 10 width: 64px; 11 height: 64px; 12 margin-top: -32px; 13 } 14 .swiper-button-prev { 15 background: url(https://haniwaman.com/wp-content/uploads/2018/05/swiper3.png) no-repeat center center / contain; 16 margin-left: 60px; 17 &::after { 18 content: ""; 19 } 20 } 21 .swiper-button-next { 22 background: url(https://haniwaman.com/wp-content/uploads/2018/05/swiper4.png) no-repeat center center / contain; 23 margin-right: 60px; 24 &::after { 25 content: ""; 26 } 27 } 28 .swiper-pagination-bullet { 29 width: 16px; 30 height: 16px; 31 } 32} 33
js
1//slider 2var swiper = new Swiper('.swiper-container', { 3 navigation: { 4 nextEl: '.swiper-button-next', 5 prevEl: '.swiper-button-prev' 6 }, 7 loop: true, 8 speed: 1000, 9 autoplay: { 10 delay: 3000 11 }, 12 pagination: { 13 el: '.swiper-pagination', 14 type: 'bullets', 15 clickable: true 16 }, 17 on: { 18 slideChange: function() { 19 $('.swiper-wrapper').find('video').each(function(index, value) { 20 $(this).get(0).pause(); 21 }); 22 realIndex = this.realIndex; 23 slideClass = $('.swiper-slide-' + realIndex); 24 video = slideClass.find('video'); 25 if (video.length) { 26 video.get(0).play(); 27 } 28 } 29 } 30}); 31
どなたかご回答いただければ幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。