Bug with transform: scale and overflow: hidden in Chrome

前端 未结 13 1454
不知归路
不知归路 2020-11-28 03:54

Working with CSS3 property transform: scale, I found interesting issue. I wanted to make a little zoom effect for pictures. But when I used for the parent div <

13条回答
  •  长情又很酷
    2020-11-28 04:33

    Both ways of solving this issuer worked fine:

    1. Add the following line to a parent wrapper (z-index: 0 is not necessary for the image itself): position: relative; z-index: 10

    2. Or add transform: translateZ(0); to a parent wrapper (with the corresponding prefixes for better browser support)

提交回复
热议问题