I'm having difficulty with vertically centering an icon that drops down on image hover, and I want to make its transition smoother. Currently, it's dropping down too abruptly and no matter what transition property I apply (ease, ease-out, etc.), it remains the same.
<div class="fader">
<a href="#">
<img width="200" height="350" src="http://placehold.it/200x350">
<span class="fa fa-search fa-3x"></span>
</a>
</div>
.fader {
position: relative;
span.fa {
position: absolute;
top: -9999px;
// center horizontally
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
transition: all 0.3s ease-out;
}
&:hover .fa {
top: 50%;
}
}