Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
#container {
  scroll-snap-type: both mandatory;
  width: 50%;
  aspect-ratio: 1/1;
  margin: 30px auto;
  background-color: #fff;
  white-space: nowrap;
  overflow-x: scroll;
  overflow-y: scroll;
  border: solid black 2px;
  scroll-padding-left: 30px;
}
#container > div {
  display: inline-block;
  height: 95%;
  border-radius: 5%;
  aspect-ratio: 1/1;
  scroll-snap-align: start;
}
.green    { background-color: lightgreen; }
.pink     { background-color: lightpink; }
.blue     { background-color: lightblue; }
.yellow   { background-color: yellow; }
.grey     { background-color: lightgray; }
</style>
</head>
<body>
<h3>CSS scroll-padding-left property, with snap in both directions.</h3>
<p>Scroll towards the middle of the container, stop scrolling, and see how the scroll-padding-left property creates a 30px distance from the left side of the container to the element.</p>
<div id="container">
  <div class="green"></div>
  <div class="pink"></div>
  <div class="yellow"></div>