<div class="absolute">
  <div class="over">
    親→position: absolute;<br />
    子→position: fixed;
  </div>
</div>

<div class="fixed">
  <div class="over">
    親→position: fixed;<br />
    子→position: fixed;
  </div>
</div>
.absolute {
  position: absolute;
  width: 150px;
  top: 0;
  bottom: 0;
  left: 0;
  background: #eee;
  overflow-x: visible;
  overflow-y: scroll;
}

.absolute .over {
  width: 250px;
  position: fixed;
  top: 1em;
  left: 100px;
  background: yellow;
  text-align: center;
}

.fixed {
  position: fixed;
  width: 150px;
  top: 0;
  bottom: 0;
  right: 0;
  background: #eee;
  overflow-x: visible;
  overflow-y: scroll;
}

  
.fixed .over {
  width: 250px;
  position: fixed;
  bottom: 1em;
  right: 100px;
  background: yellow;
  text-align: center;  
}
Rerun