JSFiddle - React, Tailwind, and code Playground

by cent cent

HTML

<div class="otherContainer">
<div class="wrapper">
<div class="fixedContainer">
    This is experimental
</div>
</div>
</div>

CSS

.fixedContainer {
    background-color:#ddd;
    position: fixed;
    padding: 2em;
    
    transform: translate(0, 0);
}

.otherContainer {
  position: relative;
    height:1000px;
    background-color:#bbb;
}
.wrapper{
  background-color: red;
  position: absolute;
  top: 200px;
  left: 100px;
  height: 200px;
  transform:translateY(0);
  overflow: auto;
}