多数实现鼠标悬停图片放大效果的案例都是方形的,方形的框不动,里面的内容放大,我想要圆形的框不动,里面的内容放大,该如何处理呢?
PHPz2017-04-10 17:54:03
HTML
<p class="circle-wrapper">
<img src="" >
</p>
CSS
.circle-wrapper,
.circle-wrapper img {
display: inline-block;
width: 50px;
height: 50px;
border-radius: 50%;
-webkit-transition: .3s;
transition: .3s;
}
.circle-wrapper {
border: 1px solid #ddd;
position: relative;
overflow: hidden;
}
.circle-wrapper img {
position: absolute;
}
.circle-wrapper img:hover {
-webkit-transform: scale(2);
transform: scale(2);
}