Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
#container {
  width: 80%;
  aspect-ratio: 2/1;
  margin: auto;
  border: solid black 2px;
  overflow-x: scroll;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-snap-type: x mandatory;
  scroll-padding-right: 20px;
}
.blue {
  background-color: lightblue;
  height: 95%;
  aspect-ratio: 3/2;
}
.green {
  background-color: lightgreen;
  height: 80%;
  aspect-ratio: 4/3;
}
.blue, .green {
  display: inline-block;
  margin: 2px;
  scroll-snap-align: end;
}
</style>
</head>
<body>
<h3>CSS scroll-padding-right property.</h3>
<p>Scroll-padding-right property is set on the container, so that the snap position of child elements is offset by a distance to the right of the container.</p>
<p>In this case, snap position is set to end in x direction, so the element in focus should snap into place at the very right of the container. But instead, because of the scroll-padding-right value, the element in focus is offset by a 20px distance from the right side of the container to the child element.</p>