JSFiddle - React, Tailwind, and code Playground

by nikolya223

HTML

<div>test</div>

CSS

div {
    position: relative;
    width: 90px;
    padding: 5px;
    background: yellow;
}

div:before {
    content: '';
    display: block;
    position: absolute;
    top: 5px;
    bottom: -5px;
    right: -10px;
    width: 10px;
    background: grey;
    
    transform: skew(0, 45deg);
    -webkit-transform: skew(0, 45deg);
    -moz-transform: skew(0, 45deg);
    -o-transform: skew(0, 45deg);
    -ms-transform: skew(0, 45deg);
 filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.9550736440472949,M12=0.2963685787093853,M21=-0.29636 85787093853,M22=0.9550736440472949,SizingMethod='auto expand'); z-index: 0; zoom: 1;
}

div:after {
    content: '';
    display: block;
    position: absolute;
    bottom: -10px;
    left: 5px;
    right: -5px;
    height: 10px;
    background: black;
    
    transform: skew(45deg, 0);
    -webkit-transform: skew(45deg, 0);
    -moz-transform: skew(45deg, 0);
    -o-transform: skew(45deg, 0);
    -ms-transform: skew(45deg, 0);
}