<style>
  .wrapper.overflow {
    overflow-y: scroll;
    overflow-x: visible;
  }
</style>

<div class="wrapper overflow">
  <div class="overflow-child"></div>
</div>
body {
  display: flex;
  gap: 40px;
}

.wrapper {
  width: 200px;
  height: 200px;
  border: solid;
  position: relative;
}

.overflow-child {
  position: absolute;
  bottom: -25px;
  right: -25px;
  border: solid;
  width: 50px;
  height: 50px;
  background: maroon;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.