Open this example in the interactive library
Source code
<style>
.demo {
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
gap: 0.5rem;
width: 13rem;
}
.tile {
flex: 0 0 90%;
scroll-snap-align: start;
}
</style>
<div class="demo">
<span class="tile">One</span><span class="tile">Two</span
><span class="tile">Three</span>
</div>