JSFiddle - React, Tailwind, and code Playground

HTML

<div  id="one">

</div>

<div id="two">

</div>
<div id="three">

</div>

CSS

body {
  margin: 0;
}
div {
  width: 100%;
}

#one {
  position: fixed;
  z-index: 1;
  height: 50px;
  background: red;
}

#two {
  z-index: 2;
  position: absolute;
  height: 200px;
  background: green;
}

#three {
  height: 1000px;
  background: yellow;
}