JSFiddle - React, Tailwind, and code Playground
by Alexander Pankov
HTML
<section>
<figure></figure>
</section>
CSS
figure {
border-radius: 50%;
width: 140px;
height: 140px;
position: relative;
overflow: hidden;
display: inline-block;
cursor: pointer;
margin: 0;
top: -120%;
transition: top 0.25s cubic-bezier(0, 0.3, 1, 0.7);
box-shadow: 0px 5px 4px -4px rgba(0, 0, 0, 0.4), 10px 4px 10px -8px rgba(0, 0, 0, 0.2), -10px 4px 10px -8px rgba(0, 0, 0, 0.2);
background-size: cover;
background-color: peachpuff;
}
figure img {
vertical-align: bottom;
z-index: -5;
max-width: 100%;
max-height: 100%;
}
figure:hover {
top: 120%;
}
figure:before, figure:after {
content:'';
display: block;
position: absolute;
height: 100%;
}
figure:before {
width: 140%;
top: inherit;
left: -20%;
opacity: 0.6;
background-image: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 40%, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 0));
transform: rotate(-20deg);
}
figure:after {
width: 100%;
top: 0;
border-radius: 50%;
box-shadow: inset -5px -15px 40px rgba(0, 0, 0, 0.1);
background-image: radial-gradient(35% 25%, closest-corner, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
}
figure:nth-child(1) {
background-image: url("http://25.media.tumblr.com/a06657b87067cce28fc46842172d76cd/tumblr_mg7ihnoODd1rha3vbo1_500.png");
}
/* section {
position: absolute;
width: 100%;
top: 50%;
margin: -70px 0;
text-align: center;
} */
body {
margin: 0;
/* background-image: linear-gradient(to bottom, #91e0c8, #cdf1e6); */
overflow: hidden;
}
html {
height: 100%;
}