Align block to the center (transform)
https://habr.com/ru/post/238449
HTML
<div class="parent">
<div class="block">
<img src="https://habrastorage.org/files/50f/7b2/1cc/50f7b21ccabd4b20bc0369f228138b5b.jpg" alt="">
</div>
</div>
CSS
.parent {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
overflow: auto;
}
.block {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.block img {
display: block;
}