JSFiddle - React, Tailwind, and code Playground
by Forresty
HTML
<a href="#" class="font_smooth btn btn_about"><span class="btn_text_onTop">LINK</span></a>
CSS
.btn {
position: relative;
display: inline-block;
border: none;
font-family: fira sans;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.125em;
font-weight: 700;
}
.btn_about {
color: #000;
font-size: 0.8em;
background: none;
font-size: 1.5em;
padding: 1.5em 3.5em;
//display: inline-block;
margin: 1.875em auto 0;
transition: all 0.3s;
border: 0.1875em solid #000;
overflow: hidden;
}
.btn_text_onTop {
position: relative;
z-index: 2;
}
.btn_about:after {
content:'';
position: absolute;
width: 0%;
height: 100%;
top: 0;
left: 0;
background: black;
z-index: 1;
transition: all 0.3s;
}
.btn_about:hover, .btn_about:active {
color: white;
}
.btn_about:hover:after, .btn_about:active:after {
width: 100%;
}