overflow:hidden ignored with border-radius and CSS transforms (webkit only)

前端 未结 4 852
天命终不由人
天命终不由人 2020-12-04 22:25

I want to have a square image inside a circle.

When the user hovers over the image, the image should scale (zoom in).

The circle should remain the same size.

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 23:25

    Add this code to your parent div and solve problem :

    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    

提交回复
热议问题