JSFiddle - React, Tailwind, and code Playground

by apoucoz

HTML

<a href="#image1">
    <img src="http://s2.goodfon.ru/wallpaper/previews-middle/509112.jpg" width="200px" />
</a>
<a href="#" id="image1" class="pressbox">
    <img src="http://s2.goodfon.ru/wallpaper/previews-middle/509112.jpg" />
</a>

<a href="#image2">
    <img src="http://s1.goodfon.ru/wallpaper/previews-middle/412661.jpg" width="200px" />
</a>
<a href="#" id="image2" class="pressbox">
    <img src="http://s1.goodfon.ru/wallpaper/previews-middle/412661.jpg" />
</a>

<a href="#image3">
    <img src="http://s2.goodfon.ru/wallpaper/previews-middle/665112.jpg" width="200px" />
</a>
<a href="#" id="image3" class="pressbox">
    <img src="http://s2.goodfon.ru/wallpaper/previews-middle/665112.jpg" />
</a>

CSS

.pressbox {
    width: 0;
    height: 0;
    position: fixed;
    overflow: hidden;
    left: 0;
    top: 0;
    z-index: 9999;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
}
.pressbox img {
    opacity: 0;
    padding: 10px;
    background: #ffffff;
    margin-top: 100px;
    -webkit-box-shadow: 0px 0px 15px #444;
    -moz-box-shadow: 0px 0px 15px #444;
    box-shadow: 0px 0px 15px #444;
    -moz-transition: opacity .25s ease-in-out;
    -webkit-transition: opacity .25s ease-in-out;
    transition: opacity .25s ease-in-out;
}
.pressbox:target {
    width: auto;
    height: auto;
    bottom: 0;
    right: 0;
}
.pressbox:target img {
    opacity: 1;
}