How to make CSS3 rounded corners hide overflow in Chrome/Opera

后端 未结 13 2087
无人及你
无人及你 2020-11-22 09:10

I need round corners on a parent div to mask content from its childen. overflow: hidden works in simple situations, but breaks in webkit based browsers and Oper

13条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 09:46

    Supported in latest chrome, opera and safari, you can do this:

    -webkit-clip-path: inset(0 0 0 0 round 100px);
    clip-path: inset(0 0 0 0 round 100px);
    

    You should definitely check out the tool http://bennettfeely.com/clippy/!

提交回复
热议问题