JSFiddle - React, Tailwind, and code Playground
by Alexey Lisovy
CSS
div
{
width: 200px;
height: 40px;
background: #35d;
font: 18px Arial Helvetica sans-serif;
color: white;
position: absolute; /*центрирую блок, эта и ещё 2 строчки*/
top: 50%; left: 50%;
transform: translate(-50%, -50%);
text-align: center; /*центрирую текст, эта и след строчка*/
line-height: 40px;
box-sizing: border-box;
border-top: 1px dotted white;
border-left: 1px dotted white;
box-shadow: -4px -4px 0 4px #35d;
}
div::before
{
content: '';
display: block;
position: absolute;
bottom: 0;
left: -9px;
width: 0;
border-left: 4px solid #FFF;
border-bottom: 4px solid #FFF;
border-top: 4px solid #35d;
border-right: 4px solid #35d;
}
div::after
{
content: '';
display: block;
position: absolute;
top: -9px;
right: 0;
width: 0;
border-left: 4px solid #35d;
border-bottom: 4px solid #35d;
border-top: 4px solid #fff;
border-right: 4px solid #fff;
}