<p>Scroll up and down!</p>
<div id="scrollableElement">
  <button>A</button>
  <button>B</button>
  <button>C</button>
  <button>D</button>
</div>
body {
  font-family: Roboto, Arial, Helvetica, Sans-Serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
}

p {
  margin: 0.5em;
}

#scrollableElement {
  max-width: 200px;
  padding: 2px;
  box-sizing: border-box;
  border: 2px dashed #999;
  border-radius: 4px;
  display: flex;
  overflow-y: scroll;
  
  button {
    display: inline-block;
    min-width: 100px;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin: 2px;
    border: 2px solid transparent;
    font: inherit;
    background: #eee;

    &:focus {
      border-color: blue;
      outline: 0;
    }
  }
}
View Compiled
scrollableElement.addEventListener('wheel', (ev) => {
  ev.preventDefault();
  scrollableElement.scrollLeft += ev.deltaY + ev.deltaX;
});
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.