I've been tirelessly experimenting with countless online methods, but I can't seem to make anything work.
There's a div
that needs to be flexible in width and height, positioned on a tile-able background image with a 1px border
.
The challenge is to get the bottom right corner of the div to elegantly fold up like a piece of paper.
I attempted using an image inside a fixed-width div anchored to the bottom, but it didn't quite fit the bill.
I also explored this approach, which necessitates a solid background color while my design involves a repeating pattern.
Next, I delved into this method utilizing gradients to control corner opacity. It almost worked, but incorporating a border disrupted the intended effect.
background:
linear-gradient(45deg, rgba(255,0,0,0.4), rgba(255,0,0,0.4)),
linear-gradient(135deg, rgba(255,0,0,0.4), rgba(255,0,0,0.4)),
linear-gradient(225deg, transparent 10px, rgba(255,0,0,0.4)
background-size: 14px 14px, 50% 100%, 50% 50%, 50% 50%;
background-position: 100% 0, 0 0, 100% 100%, 100% 0;
background-repeat: no-repeat;
//then an :after pseudo class to create the corner fold
If anyone has any insights or solutions, I would be extremely grateful. Thank you.