Bug with transform: scale and overflow: hidden in Chrome

前端 未结 13 1447
不知归路
不知归路 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:47

    sorry for my poor English.

    if the page isn't have positioned element, there is no need to set container element and child element z-index attribute both.

    just adding z-index: 0(or other) attribute to container element.

    .container {
        border-radius: .14rem;
        overflow: hidden;
        z-index: 0;
    }
    .child {
    
        }
    

提交回复
热议问题