某有名ファッションブランドサイトのようにswiper.jsを使用して縦横にスライドできるフルビジュアルのページの作成を使用としているのですが、最後のスライドから下にスクロールすることができません。
コールバックなどを使用しても上手く反応せず、困っています。
どなたか分かる方がいらっしゃいましたら御指南のほどお願いしたいです。
<参考サイト>
https://www.uniqlo.com/jp/ja/
<HTML>
<div id="panelWrapper"> <div id="panelInner"> <div id="panelScroll"> <div id="visualPanels" class="Vswiper-container"> <div class="swiper-wrapper"> <section class="section01 swiper-slide"> <div class="Hswiper-container"> <ul class="swiper-wrapper"> <li class="swiper-slide"> <div class="block"> <h3>TITLE01</h3> </div> </li> <li class="swiper-slide"> <div class="block"> <h3>TITLE02</h3> </div> </li> <li class="swiper-slide"> <div class="block"> <h3>TITLE03</h3> </div> </li> </ul> <div class="swiper-pagination"></div> </div> </section> <section class="section01 swiper-slide"> <div class="Hswiper-container"> <ul class="swiper-wrapper"> <li class="swiper-slide"> <div class="block"> <h3>TITLE01</h3> </div> </li> <li class="swiper-slide"> <div class="block"> <h3>TITLE02</h3> </div> </li> <li class="swiper-slide"> <div class="block"> <h3>TITLE03</h3> </div> </li> </ul> <div class="swiper-pagination"></div> </div> </section> <section class="section01 swiper-slide"> <div class="Hswiper-container"> <ul class="swiper-wrapper"> <li class="swiper-slide"> <div class="block"> <h3>TITLE01</h3> </div> </li> <li class="swiper-slide"> <div class="block"> <h3>TITLE02</h3> </div> </li> <li class="swiper-slide"> <div class="block"> <h3>TITLE03</h3> </div> </li> </ul> <div class="swiper-pagination"></div> </div> </section> </div> <div class="swiper-pagination"></div> </div> </div> </div> <!--ここから下を見せたい---> <section style="height:100vh;background: #aaa;display: flex;justify-content: center;align-items: center;"> <p>OK</p> </section> </div> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/7.0.8/swiper-bundle.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/7.0.8/swiper-bundle.min.js"></script>
css
#panelWrapper{ position: relative; min-height: 100vh; overflow: hidden; } #panelInner{ position: relative; } #panelScroll{ margin: 0; width: 100%; } .Vswiper-container{ width: 100%; height: 100%; height: calc(var(--vh, 1vh) * 100); overflow: hidden; } .Hswiper-container{ width: 100%; height: 100%; } .swiper-slide{ width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } .swiper-slide:nth-child(1) .swiper-slide:nth-child(1){background-color: red;} .swiper-slide:nth-child(1) .swiper-slide:nth-child(2){background-color: red;} .swiper-slide:nth-child(1) .swiper-slide:nth-child(3){background-color: red;} .swiper-slide:nth-child(2) .swiper-slide:nth-child(1){background-color: blue;} .swiper-slide:nth-child(2) .swiper-slide:nth-child(2){background-color: blue;} .swiper-slide:nth-child(2) .swiper-slide:nth-child(3){background-color: blue;} .swiper-slide:nth-child(3) .swiper-slide:nth-child(1){background-color: green;} .swiper-slide:nth-child(3) .swiper-slide:nth-child(2){background-color: green;} .swiper-slide:nth-child(3) .swiper-slide:nth-child(3){background-color: green;}
js
function setHeight() { let vh = window.innerHeight * 0.01; document.documentElement.style.setProperty("--vh", `${vh}px`); } setHeight(); window.addEventListener("resize", setHeight); /* 垂直スライダーの設定 */ const verticalSlider = new Swiper(".Vswiper-container", { direction: "vertical", slidesPerView: 1, speed: 500, mousewheel: { forceToAxis: true, }, pagination: { el: ".swiper__pagination", type: "bullets", clickable: true, }, }); /* 水平スライダーの設定 */ const horizontalSlider = new Swiper(".Hswiper-container", { direction: "horizontal", slidesPerView: 1, speed: 500, mousewheel: { forceToAxis: true, }, pagination: { el: ".swiper__pagination", type: "bullets", clickable: true, }, });
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。