JSFiddle - React, Tailwind, and code Playground
HTML
<div>
Zawartość
</div>
CSS
div{
position: relative;
z-index: 1;
display: inline-block;
background: #131313;
color: #fff;
font-size: 16px;
line-height: 40px;
height: 40px;
text-transform: uppercase;
text-align: center;
padding: 0px 30px;
}
div::before{
position: absolute;
z-index: 2;
top: 0;
left: 0;
content: '';
width: 0px;
height: 0px;
border-style: solid;
border-width: 40px 30px 0 0;
border-color: #FFF transparent transparent transparent;
}
div::after{
position: absolute;
z-index: 2;
bottom: 0;
right: 0;
content: '';
width: 0px;
height: 0px;
border-style: solid;
border-width: 0 0 40px 30px;
border-color: transparent transparent #FFF transparent;
}