JSFiddle - React, Tailwind, and code Playground
HTML
<div class="outer">
<div class="inner">
срака
</div>
</div>
CSS
.outer {
margin: 100px auto;
width: 300px;
height: 150px;
background: rgb(45, 55, 65);
position: relative;
overflow: hidden;
border-radius: 0 10px 0 0;
}
.inner {
width: 100%;
height: 50px;
color: white;
background-color: darkblue;
position: absolute;
text-align: center;
font: 1.2em arial;
line-height: 2.4em;
transition: opacity 1.5s 0.5s, background-color 1.5s 0.5s;
opacity: 0;
bottom: 0px;
}
.outer:hover .inner{
background-color: black;
transition-duration: 0s;
transition-delay: 0s;
opacity: 1;
animation-name: fadeOut;
animation-duration: 0.25s;
}
@keyframes fadeOut {
from {
bottom: -50px;
}
to {
bottom: 0px;
}
}