JSFiddle - React, Tailwind, and code Playground

by Glen Cheney

HTML

<html>
    <body>
        <!-- Best -->
        <h2 class="shadow"></h2>
        
        <!-- Ok -->
        <h2 class="span"><span></span></h2>
        
        <!-- Image :\ -->
        <img src="http://eightfoldstudios.com/wordpress/wp-content/themes/vestride/img/header-bubble.png" alt="some title" />
    </body>
</html>

CSS

body {
    margin: 0;
}

h2 {
    position: relative;
    width: 296px;
    height: 42px;
    background-color: #0aaacb;
    
    margin: 0 0 25px;
    padding: 5px;
    box-sizing: border-box;
}

h2.span span {
    width: 296px;
    height: 42px;
    position: absolute;
    top: 4px;
    left: 4px;
    background-color: #2d2d2d;
    z-index: -1;
}

h2.shadow {
    box-shadow: 4px 4px 0 #2d2d2d;
}

h2::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgb(45,45,45);
    bottom: -14px;
    left: 24px;
}

h2::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #0aaac8;
    bottom: -10px;
    left: 20px;
}