I've been trying to add a triangle cutout to my website. I've created a triangle in CSS for now however I want this to be a 'mask' and show the pattern background. Here's my current design.
I've tried lots of different ways, such as an inline SVG that cuts out that portion of the div, however they don't seem to scale correctly. When the screen reduces in size I want the right triangle to move along with the box rather than scale in size, like here: current design with reduced browser width.
I've also tried using a :before and :after element with no overflow to get the effect, however I was unable to create 2 triangles (top right and bottom left).
There's probably a really easy way to do this that I'm missing... Any help would be much appreciated!