<div class="container">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Exo", Arial, sans-serif;
  background-color: #f7f7f7;

  gap: 10px;
}

.container {
  display: flex;
  gap: 20px;
  width: 50vw;
  overflow-x: auto;
  box-shadow: 0 3px 10px 0 rgba(0 0 0 / 0.1);
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  border-radius: 5px;
  counter-reset: item;
}

.item {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 300px;
  height: 150px;
  background-color: #f7f7f7;
  border-radius: 4px;
  counter-increment: item;
}

.item::before {
  content: counter(item);
  color: #fff;
  font-size: 3rem;
  text-shadow: 1px 1px 0 rgba(0 0 0 / 0.25);
}

.item:nth-child(1) {
  background-color: #f1c2c6;
}

.item:nth-child(2) {
  background-color: #dac2f1;
}

.item:nth-child(3) {
  background-color: #ccf1c2;
}

.item:nth-child(4) {
  background-color: #c2e9f1;
}

.item:nth-child(5) {
  background-color: #f1ebc2;
}

.container::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.9);
  border-radius: 10px;
  background-color: #444444;
}

.container::-webkit-scrollbar {
  height: 8px;
  background-color: #f5f5f5;
  margin: 2px;
}

.container::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #d62929;
  background-image: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.4) 50%,
    transparent,
    transparent
  );
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.