I have a CSS transition that enlarges images on hover, however I would like the hover effect to simply deactivate after a certain amount of time. The reason is that the hover effect activates on mobile devices through clicking, but it never deactivates even if you click somewhere else on the screen, unless you click on another image or link which then activates that hover event. Here is my CSS:
.effectfront {
border: none;
margin: 0 auto;
}
.effectfront:hover {
-webkit-transform: scale(12);
-moz-transform: scale(12);
-o-transform: scale(12);
transform: scale(12);
transition: all 0.5s;
-webkit-transition: all 0.5s;
padding: 2px;
background: rgba(0,0,0,0.5);
border:1px solid rgba(0,0,0,1);
}
<body><img class="effectfront" style="width:50px" src="https://sharetribe.s3.amazonaws.com/images/listing_images/images/100255/big/b4b8ry-cuaav_os.jpg?1427485186"style=height:80%> </body>
Is there a workaround using just CSS? Or would Javascript be required?