JSFiddle - React, Tailwind, and code Playground
by Denis Ineshin
HTML
<div class="item">
<div class="item-mask"></div>
<div class="item-inner"></div>
</div>
CSS
.item {
position: relative;
width: 200px;
height: 200px;
background: #eee;
overflow: hidden;
border-radius: 50%;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
}
.item-mask {
position: absolute;
top: 100%; left: 0;
width: 100%; height: 100%;
background: #f00;
border-radius: 50%;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
-webkit-transition: all 500ms cubic-bezier(0.420, 0.000, 0.580, 1.000);
-moz-transition: all 500ms cubic-bezier(0.420, 0.000, 0.580, 1.000);
-o-transition: all 500ms cubic-bezier(0.420, 0.000, 0.580, 1.000);
transition: all 500ms cubic-bezier(0.420, 0.000, 0.580, 1.000); /* ease-in-out */
-webkit-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
-moz-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
-o-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000); /* ease-in-out */
}
.item:hover .item-mask {
top: 0;
}
.item-inner {
position: absolute;
top: 15px; left: 15px;
width: 170px; height: 170px;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}