CSS beginner here
img {
top: 0;
transition: all 0.5s ease-out;
}
img:hover {
position: relative;
top: -5px;
}
On hover, this transition works fine. But when you mouse away again there is no effect, the 'reverse' transition is instant. How to achieve 0.5s on reverse transition too?