skewed blocks transparency issue
skewed blocks transparency issue
by Johny
HTML
<div class="block"></div>
CSS
.block{
position: relative;
width: 200px;
height: 200px;
margin-left: 100px;
background-color: rgba(0, 0, 0, 0.5);
transform: skewX(-21deg);
}
.block:before{
content: '';
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 100%;
width: 100px;
height:200px;
background-color: rgba(0, 0, 0, 0.5);
}