我可以为您提供帮助,以下是您需要翻译的内容:
我在网站上使用transform: scale();。希望有人能帮我解答一个在网上搜索无法解决的问题。
这是我的代码: HTML:
<div class="hopp_circle_img">
<img src="..." alt="" />
</div>
CSS:
.hopp_circle_img {
position: relative;
width: 100% !important;
height: 100% !important;
max-width: 100% !important;
max-height: 100% !important;
overflow: hidden;
-webkit-border-radius: 50%;
border-radius: 50%;
z-index: 0;
}
.hopp_circle_img img {
-webkit-transition: transform 0.15s;
transition: transform 0.15s;
}
.hopp_circle_img img:hover {
display: block;
z-index: 100;
-webkit-transform: scale(1.25);
transform: scale(1.25);
}
这个可以实现,但是我被要求在鼠标移入和移出时使效果不同。例如,在鼠标移入时快速缩放,而在鼠标移出时慢慢缩放。CSS3或Javascript中是否有解决方案?
谢谢 rabox