QuickAnswer
by

Overlay elements with display: grid in CSS. position: absolute is not used.

Overlay elements with display: grid in CSS. position: absolute is not used.

When overlapping elements with CSS, display: grid is convenient, although it has been overlapped with position so far.

Stack

<div class="block">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>

<style>
div.block {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
}
div.block > div:nth-of-type(1) {
    grid-row: 1/2;
    grid-column: 1/2;
}
div.block > div:nth-of-type(2) {
    grid-row: 1/2;
    grid-column: 1/2;
}
div.block > div:nth-of-type(3) {
    grid-row: 1/2;
    grid-column: 1/2;
}
</style>

Add z-index, overflow, width, height, etc. as needed.
It feels like adjusting it by aligning it with display: grid.

<div class="block">
    <div><img src="example.svg"></div>
    <div>2</div>
    <div><a href="#example">3</a></div>
</div>

<style>
div.block {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    overflow: hidden;
}
div.block > div:nth-of-type(1) {
    z-index: 1;
    grid-row: 1/2;
    grid-column: 1/2;
    width: 100%;
    height: 100%;
}
div.block > div:nth-of-type(2) {
    z-index: 2;
    grid-row: 1/2;
    grid-column: 1/2;
    width: 100%;
    height: 100%;
}
div.block > div:nth-of-type(3) {
    z-index: 3;
    grid-row: 1/2;
    grid-column: 1/2;
    width: 100%;
    height: 100%;
}
</style>
CONTENTS
Web Browser