JSFiddle - React, Tailwind, and code Playground

by Cath_kb

HTML

<div class="card">
        <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Bachalpseeflowers.jpg/220px-Bachalpseeflowers.jpg" alt="V" class="one" height="100" width="100" />
        <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Hopetoun_falls.jpg/220px-Hopetoun_falls.jpg" alt="V" class="two" height="100" width="100" />
        <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/57/Galunggung.jpg/220px-Galunggung.jpg" alt="V" class="three" height="100" width="100" />
</div>

CSS

.card {
    position: relative;
}

.card img {position: absolute;  border: solid 1px;}
                
.card img:hover {z-index: 4 !important; border: dashed 2px blue;}
                
.card img.one {
        left: 0px;
        top: 0px;
        background: red;
    z-index: 1;
}

.card img.two {
        left: 25px;
        top: 25px;
        background: silver;
    z-index: 2;
}               

.card img.three {
        left: 50px;
        top: 50px;
        background: yellow;
    z-index: 3;
}