I have an image where I make a transition scale
with hover
, zooming in the image when hovering the mouse:
img{
width: 200px;
height: 100px;
transition: transform .5s ease;
}
img:hover{
transform: scale(1.5);
}
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
The transition time is half a second ( .5s
), but I would like it to take about twice as long to return to its original size, ie 1 second.
Is it possible to do this with CSS only? Or how else would I do it?