JSFiddle - React, Tailwind, and code Playground
by Tan
HTML
<a href="#" class="img">hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh hbehe r hwerhpyoj wryh
<span></span>
</a>
CSS
body {
background-color: #35bcd6;
text-align: center;
}
.img {
display: inline-block;
position: relative;
margin: 2em 1em;
box-shadow: 0 .1em .1em #333;
background-size: cover;
background-position: -100% -100%, 0 0;
overflow: hidden;
}
.img span {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(-240deg, rgba(255, 255, 255, 0) calc(50% - 1em), rgba(255, 255, 255, 0.17) 0, rgba(255, 255, 255, 0.48) calc(50% + 1em),rgba(255, 255, 255, 0.1) 0) no-repeat;
transform: translate(-100%, -100%);
transition: all .3s ease-out;
}
.img:nth-child(1) > span {
background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1) calc(50% + 1em),transparent);
}
.img:hover > span {
transform: translate(100%, 100%);
}