DEMO
悬停时放大图像很容易。
图像圆形边框很容易。
将它们结合起来,好的,但是在过渡过程中圆 Angular 消失了。
过渡后,圆 Angular 又回来了。
问题: 如何在过渡时保留圆 Angular ?
.img-wrapper {
border-radius: 10px;
}
.img-wrapper img {
transition: transform .5s ease;
transform:scale(1);
}
.img-wrapper img:hover {
transform:scale(1.5);
}
最佳答案
尝试添加这个:
.img-wrapper {
border-radius: 10px;
position:relative;
z-index:1;
}
如果仍然无法正常工作,请尝试以下问题:
overflow:hidden ignored with border-radius and CSS transforms (webkit only)
关于css - 如何在图像悬停放大过渡期间保留图像圆 Angular ?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32370197/