JSFiddle - React, Tailwind, and code Playground

by oti ext

HTML

<div class="wrap">
    <div class="inner">ああああ</div>
    <div class="beak"></div>
</div>

CSS

body{
    background-color: #ffffff;
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    background-image: linear-gradient(45deg,  #cccccc 25%, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc 75%),
                  linear-gradient(-135deg, #cccccc 25%, #cccccc 25%, transparent 25%, transparent 75%, #cccccc 75%, #cccccc 75%);
}

div{
}

.wrap{
    position: relative;
    margin: 50px;
    border-width: 1px 1px 0;
    border-color: red;
    border-style: solid;
    border-radius: 10px 10px 0 0;
    width: 300px;
    height: 100px;
    background-color: rgba(255,255,255, .5);    
}

.wrap::before,
.wrap::after{
    content: "";
    display: block;
    position: absolute;
    top: 100%;
    border-color: red;
    border-style: solid;
    width: 10px;
    height: 10px;
    background-color: rgba(255,255,255, .5);
}

.wrap::before{
    left: -1px;
    border-width: 0 0 1px 1px;
    border-radius: 0 0 0 10px;
}

.wrap::after{
    right: -1px;
    border-width: 0 1px 1px 0;
    border-radius: 0 0 10px 0;
}

.inner{
    /* position: relative; */
}

.inner::before,
.inner::after{
    content: "";
    display: block;
    position: absolute;
    left: 10px;
    width: 280px;
}

.inner::before{
    bottom: -10px;
    height: 10px;
    background-color: rgba(255,255,255, .5);
}
.inner::after{
    bottom: -11px;
    height: 1px;
    background-image: linear-gradient(to right, red 43px, transparent 43px, transparent 72px, red 72px);
}

.beak{
    position: absolute;
    bottom: -37px;
    left: 40px;
    border-width: 0 2px 2px 0;
    border-color: red;
    border-style: solid;
    width: 50px;
    height: 50px;
    background-image: linear-gradient(to right bottom, transparent 50%, rgba(255,255,255, .5) 50%);
    transform:  scale(.4, .7) rotate(45deg);
}