JSFiddle - React, Tailwind, and code Playground
by Caleb Wong
HTML
<script src="https://raw.github.com/LeaVerou/prefixfree/master/prefixfree.min.js"></script>
<div class="speech-bubble">
Content
</div>
CSS
.speech-bubble {
background: #999;
background: linear-gradient(top, #444 0%,#999 100%);
background-clip: padding-box;
border-radius: 4px;
border: 5px solid rgba(0, 0, 0, 0.2);
color: #fff;
padding: 20px;
width: 200px;
height: 100px;
position: relative;
}
.speech-bubble:before{
content: ' ';
border-color: rgba(0, 0, 0, 0.2) transparent transparent;
border-style: solid;
border-width: 17px;
position: absolute;
bottom: -39px;
left: 16px;
}
.speech-bubble:after{
content: ' ';
border-color: #999 transparent transparent;
border-style: solid;
border-width: 13px;
position: absolute;
bottom: -26px;
left: 20px;
}
body {
padding: 20px;
}