JSFiddle - React, Tailwind, and code Playground
HTML
<div class="img-wrapper">
<div class="status">
<div class="status-text">Текст на полоске</div>
</div>
</div>
CSS
.img-wrapper {
position: relative;
height: 200px;
width: 200px;
background: #eee;
margin: 50px;
}
.status {
position: absolute;
background: red;
z-index: 5;
top: 30px;
left: -20px;
padding: 2px 0;
}
.status-text {
color: #fff;
overflow: hidden;
padding: 10px 30px 10px 10px;
margin-right: -42px;
position: relative;
z-index: 5;
}
.status-text:before,
.status-text:after {
content: '';
width: 100%;
height: 1px;
background: #FFF;
position: absolute;
top: 0;
left: -1px;
-webkit-transform: skew(-45deg);
-moz-transform: skew(-45deg);
-o-transform: skew(-45deg);
-ms-transform: skew(-45deg);
transform: skew(-45deg);
}
.status-text:before {
top: auto;
bottom: 0;
-webkit-transform: skew(45deg);
-moz-transform: skew(45deg);
-o-transform: skew(45deg);
-ms-transform: skew(45deg);
}
/*status trail*/
.status:after {
content: '';
position: absolute;
width: 0;
height: 0;
border: 22px solid red;
border-right-color: transparent;
top: 0;
right: -44px;
z-index: 1;
}