I have a triangle:
#tri{
width: 0;
height: 0;
float: right;
border-top: 25px solid red;
border-left: 25px solid transparent;
}
I want the whole triangle area to be a link, so I did:
<a href="...">
<div id="tri">
</div>
</a>
And I also want the area to "cut" a background image, so that rather than red, it's a triangular portion of an image.
I tried numerous things, but to be honest, I was just guessing - adding it to #tri
as a background image, adding img
to the div
element, as you already know these didn't work.
I assume it's possible, but I haven't been able to find an example, tutorial, or similar demo.
Can anyone lend me a hand?