0
I created an effect Hover zooming scale(1.5)
in the image, but when it leaves the Hover the border-radius
the image returns the square image before returning to border-radius
original. The problem only happens in Chrome and Safari. Follow my code below:
.hoverzoom {
position: relative;
min-width: 250px;
overflow: hidden;
border-radius: 8px;
}
.hoverzoom > img {
width: 100%;
border-radius: 8px;
-webkit-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
-moz-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
-ms-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
-o-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
}
.hoverzoom:hover > img {
-webkit-transform: scale(1.5);
-moz-transform: scale(1.5);
-ms-transform: scale(1.5);
-o-transform: scale(1.5);
transform: scale(1.5);
}
.hoverzoom .retina{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
background: none repeat scroll 0 0 rgba(31, 124, 43, 0.5);
border-radius: 8px;
text-align: center;
padding: 30px;
-webkit-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
-moz-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
-ms-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
-o-transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
transition: all .8s cubic-bezier(.190, 1.000, .220, 1.000);
}
.hoverzoom:hover .retina {
opacity: 1;
box-shadow: rgba(0,0,0,.5);
}
<div class="hoverzoom">
<img src="https://i.stack.imgur.com/aipDU.jpg">
<a href="#">
<div class="retina"></div>
</a>
</div>
Does anyone know what’s wrong?
Also add the HTML code to your question so we can recreate this.
– Chun
https://jsfiddle.net/ot1jp4b5/2/
– Vitor Adriano