Having an issue with my icon when hovering. I am trying to change the img src
on hover. Here is the code I currently have:
#aks {
width: 0px;
max-height: 0;
transition: max-height 0.15s ease-out;
overflow: hidden;
background: url("https://img.icons8.com/windows/32/000000/like.png") no-repeat;
padding: 50px;
}
#aks:hover {
background: url("https://img.icons8.com/officexs/32/000000/like.png")
no-repeat;
max-height: 500px;
transition: max-height 0.25s ease-in;
}
<img id="aks" src="https://img.icons8.com/windows/32/000000/like.png" />
My goal is to have the outline heart icon replaced by a filled heart icon upon hover. The transition should simulate the filling of the heart from bottom height 0 to full height, creating a visually appealing effect. This example illustrates what I am aiming for: codepen
I would greatly appreciate any alternative solutions or suggestions apart from the one provided. Thank you in advance!