JSFiddle - React, Tailwind, and code Playground
by jrunning
HTML
<div id="caek">
<div></div>
<div></div>
<div></div>
</div>
CSS
body {
background-color: lightblue;
}
#caek, #caek::before, #caek::after {
height: 300px;
transform-origin: 100% 100%;
background-color: snow;
}
#caek {
display: flex;
flex-direction: column;
width: 350px;
margin: 100px auto;
transform: skewY(2deg);
z-index: 150;
}
#caek::before, #caek::after {
content: '\a0';
position: absolute;
z-index: 0;
}
#caek::before {
top: 0;
left: 0;
width: 75px;
transform: matrix(1, -0.7333, 0, 1, 0, 0);
transform-origin: 0% 100%;
}
#caek::after {
top: 0;
right: 0;
width: 275px;
transform: matrix(1, 0.2, 0, 1, 0, 0);
}
#caek div {
display: flex;
flex: 1;
flex-direction: column;
height: 33%;
margin: 10px 0 0 10px;
z-index: 200;
background-color: salmon;
}
#caek div + div {
background-color: lightgoldenrodyellow;
}
#caek div + div + div {
background-color: lightgreen;
}