How to hide canvas content from parent rounded corners in any webkit for Mac?

后端 未结 6 630

I have a parent div with rounded corners that contains a canvas:

6条回答
  •  暖寄归人
    2020-12-04 02:22

    Does the canvas have to use a width/height value? If you set the height of the canvas in the html to a smaller value, or even remove the values all together it gets clipped properly (only tested in Chrome).

    http://jsfiddle.net/LwZ6v/

提交回复
热议问题