JSFiddle - React, Tailwind, and code Playground
by Dmitriy Shvanyk
HTML
<div class="bg">
<div class="b">
<div class="b-triangle">
</div>
</div>
</div>
CSS
*{
box-sizing: border-box;
}
.bg{
height: 500px;
padding: 15px;
background: url(https://image.freepik.com/free-vector/blurred-nature-background-with-retro-badge_23-2147508445.jpg) no-repeat center top;
background-size: cover;
}
.b{
background: rgba(0,0,0,.5);
min-height: 100px;
max-width: 300px;
margin: 25px auto;
position: relative;
border: 2px solid #000;
border-bottom: none;
}
.b:before,
.b:after{
content: '';
position: absolute;
height: 2px;
background: #000;
}
.b:before{
bottom:0; left: 0;
width: calc(100% - 65px);
}
.b:after{
bottom:0; right: 0;
width: 25px;
}
.b-triangle{
position: absolute; top: 100%; right: 25px;
width: 0;
height: 0;
border-style: solid;
border-width: 20px 20px 0 20px;
border-color: rgba(0,0,0,.5) transparent transparent transparent;
}
.b-triangle:before,
.b-triangle:after{
content: '';
position: absolute; top: -12px;
width: 30px;
height: 2px;
background: #000;
}
.b-triangle:before{
left: -5px;
transform: rotate(-45deg);
}
.b-triangle:after{
right: -5px;
transform: rotate(45deg);
}