JSFiddle - React, Tailwind, and code Playground

HTML

<div class="book">
  <div class="page1">
    <h2>Page1</h2>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main scrollbar<br/>
    scroll from main...

CSS

.book {
  position: relative;
}
.page1 {
  background-color: azure;
  width: 50%;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0;
  top:0;
}

.page2 {
  background-color: tomato;
  width: 50%;
  margin: 0;
  padding: 0;
  position: fixed;
  right:0;
  top: 0;
}