It is necessary that the hover effect appears only from the bottom of the green square, without appearing in other blocks. And yet, if we move the cursor to the place where the block appearing at hover is hidden, it starts to twitch and generally behaves strangely.
I can not understand what and how to fix it. Help plz.
.wrapper { border:1px solid red; width: 600px; height: 100px; text-align: center; background-color: #ff6600; } .block { width: 50px; height: 50px; background-color:green; display: inline-block; position: relative; } .block:hover .block__hover{ bottom:0; opacity: 1; } .block__hover { width: 100%; height: 50%; background-color: black; position: absolute; bottom: -100%; opacity: 0; transition: bottom 0.5s; } .block2{ width: 50px; height: 50px; background-color:red; margin: 0 auto; } <div class="wrapper"> <div class="block"> <div class="block__hover"></div> </div> <div class="block2"></div> </div>