How to cut away part of an image or container diagonally using CSS?
The part that needs to be cut away has the form of a triangle
Just an idea:
HTML
CSS
figure {
position: relative;
display: inline-block;
overflow: hidden;
padding: 0;
line-height: 0;
}
figure:after {
content: '';
position: absolute;
width: 200%;
height: 100%;
left: 0;
bottom: -91%;
background: red;
-webkit-transform: rotate(355deg);
transform: rotate(355deg);
}
Demo
Try before buy