JSFiddle - React, Tailwind, and code Playground
by terby
HTML
<div class="ribbon">
<span class="ribbon1">
<span>BANNER SAMPLE TEXT</span>
</span>
</div>
CSS
.ribbon {
width: 140px;
height: 100px;
position: relative;
background-size: cover;
text-transform: uppercase;
color: white;
float: left;
}
.ribbon1 {
position: absolute;
}
.ribbon1 span {
position: relative;
display: block;
text-align: center;
background: #A9A9A9;
line-height: 1;
padding: 12px 8px 10px;
width: 190px;
border-radius: 0px 8px 12px 12px;
border-bottom: 1px solid black;
border-left: 1px solid black;
}
.ribbon1 span:before,
.ribbon1 span:after {
position: absolute;
content: "";
}
.ribbon1 span:before {
height: 6px;
width: 6px;
left: -6px;
top: 0;
background: #a9a9a9;
}
.ribbon1 span:after {
height: 6px;
width: 8px;
left: -8px;
top: 0;
border-radius: 8px 8px 0 0;
background: #565656;
}