<div class="container">
<div class="block">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repellat, debitis quaerat maiores a sequi qui repellendus consectetur facilis tempore aliquid explicabo ducimus voluptatum delectus ipsam blanditiis. Placeat accusantium doloribus quas!</div>
<div class="block">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
<div class="swiper-slide">Slide 4</div>
<div class="swiper-slide">Slide 5</div>
<div class="swiper-slide">Slide 6</div>
<div class="swiper-slide">Slide 7</div>
<div class="swiper-slide">Slide 8</div>
<div class="swiper-slide">Slide 9</div>
<div class="swiper-slide">Slide 10</div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</div>
</div>
body {
margin: 0;
overflow-x: hidden;
height: 200vh;
}
.container {
display: flex;
margin: 0 auto;
max-width: 360px;
outline: 1px dashed orangered;
}
.block {
width: 50%;
}
.swiper-container {
width: 50vw;
height: 100%;
outline: 2px dashed forestgreen;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff6;
display: flex;
justify-content: center;
align-items: center;
}
var swiper = new Swiper(".swiper-container", {
pagination: {
el: ".swiper-pagination",
type: "fraction"
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev"
}
});