JSFiddle - React, Tailwind, and code Playground
by petroveg
HTML
<button type="button" class="button">Кнопка</button>
CSS
.button {
position: relative;
box-sizing: border-box;
height: 2em;
padding: 0 1em;
border: 0;
outline: 0;
border-left: 5px solid #54aa79;
background: none;
font: bolder 2em sans-serif;
color: #54aa79;
}
.button::-moz-focus-inner {
padding: 0;
border: 0;
}
.button:before,
.button:after {
content: "";
position: absolute;
z-index: -1;
right: 0;
left: -5px;
border-right: 5px solid #54aa79;
}
.button:before {
top: 0;
bottom: 50%;
border-top: 5px solid #54aa79;
transform-origin: 0 0;
transform: skewX(20deg);
}
.button:after {
top: 50%;
bottom: 0;
border-bottom: 5px solid #54aa79;
transform-origin: 0 100%;
transform: skewX(-20deg);
}
.button:active,
.button:focus,
.button:hover {
color: #fff;
}
.button:focus,
.button:hover,
.button:focus:before,
.button:hover:before,
.button:focus:after,
.button:hover:after {
background: #54aa79;
}
.button:active,
.button:active:before,
.button:active:after {
background: #d8274a;
border-color: #d8274a;
}