JSFiddle - React, Tailwind, and code Playground

by adamschwartz

HTML

<div class="box">
    <div class="bar"></div>
</div>

CSS

.box {
    height: 300px;
    width: 200px;    
    position: relative;
    margin: 100px auto
}

.bar {
    position: absolute;
    bottom: 100%;
    height: 10px;
    width: 100%;
    background: linear-gradient(135deg, #ffaf2a, #ff670f);
    border-radius: 3px 3px 0 0
}

.box:before, .box:after {
    content: "";
    display: block;
    position: absolute;
    background-color: transparent;
    -webkit-mask-box-image: -webkit-linear-gradient(top, transparent 0%, #000 5%, rgba(0, 0, 0, .8) 26%, transparent 100%);
    top: 0;
    height: 100%;
    width: 8px    
}

.box:before {
    background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0));
    right: 100%
}

.box:after {
    background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0));
    left: 100%
}