console
<html>
<body>
<div id="outer">
<section></section>
<div class="main">
<button type="button">x</button>
<p>123123</p>
<p>123123</p>
</div>
</div>
</body>
</html>
body{
margin: 0 0;
padding: 0 0;
}
.main{
position: fixed;
background-color: royalblue;
width: 300px;
height: 200px;
box-sizing: border-box;
padding: 20px;
bottom: 0;
right: 0;
}
#outer{
position: relative;
overflow: auto;
}
#outer section{
width: 100%;
height:10000px;
overflow: auto;
}
button {
position: absolute;
width: 20px;
height: 20px;
background-color: red;
border-radius: 50%;
border: 1px solid black;
top: -10px;
left: -10px;
}