<div class="container">
<div class="sticky1">横のスクロール</div>
</div>
CSS
.container{
height: 400px;
background: rgb(218, 148, 148);
width: 300vw;
text-align: center;
margin-bottom: 150px;
}
.sticky1{
width: 200px;
height: 200px;
background: rgb(200, 200, 200);
position: sticky;
top: 30px;
left: 30px;
display: flex;
justify-content: center;
align-items: center;
}