JSFiddle - React, Tailwind, and code Playground

by Gregor Adams

HTML

<div id="outer">
    <div id="inner">
        <p>I am pure CSS</p>
        <p>I am only one &lt;div&gt; with :before and :after pseudo-elements</p>
    </div>
</div>

CSS

body {
    background: #864;
    height:100%;
    width:100%;
    font-family: Monospace;
}

#outer {
    height: 150px;
    width: 250px;
    position: absolute;
    left: 40%;
    top: 20%;
    color: white;
    font-size: 16px;
}
#inner {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background-color: rgba(0, 0, 0, .3);
    padding:20px;
    border-radius: 20px;
    border-top-left-radius: 0;
}
#inner:before {
    content: "";
    background-image: -webkit-linear-gradient(transparent 50%, rgb(0, 0, 0) 50%, rgb(0, 0, 0)),
        -webkit-linear-gradient(0deg, transparent 50%, rgb(0, 0, 0) 50%, rgb(0, 0, 0));
    height: 40px;
    width: 40px;
    border-radius: 40px;
    position: absolute;
    top: -20px;
    left: -20px;
        -webkit-transform: rotateZ(180deg);
    opacity:0.3;
}
#inner:after {
    content: "";
    background: url('http://lorempixel.com/10/10/sports/1/') no-repeat;
    background-position:0;
    height: 10px;
    width: 10px;
    border-radius: 10px;
    position: absolute;
    top: -6px;
    left: -6px;
    -webkit-box-shadow: 0 0 10px rgb(255,255,255);
    border: 1px rgb(255,255,255) solid;

}