Is it possible to clip/mask a div using html5 and canvas?
问题 I have a photo gallery that uses images "cut off" at an odd angle but the cut-out needs to be transparent in order to see the background. I had been able to get it to work using alpha masks but there must be a better way. Rather than mask each image within the gallery, I wondered whether it might be possible instead to clip/mask the containing div using html5. I've been able to find a jsfiddle, which I've changed slightly, but it clips an image - not a div. Now I'm having a complete brain