fixed

by chen Bright

HTML

<div class="box">
  <div class="outter">outter
    <div class="inner">inner</div>
  </div>
</div>

CSS

.box {
      display: flex;
    }
    .outter {
      z-index: 1;
      
      width: 200px;height: 300px;background: red;color: #fff;
    }
    
    .inner {
      position: relative;z-index: -1;
      
      width: 300px;height: 200px;background: blue;
    }