JSFiddle - React, Tailwind, and code Playground
by Prithviraj mitra
HTML
<a href="#" class="button">
<span>Hover Me</span>
</a>
CSS
@import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700);
body {
font-family:"Open Sans Condensed", sans-serif;
font-size: 24px;
}
.button {
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;
color: #3a3e47;
font-size: 0.85em;
font-family:"Open Sans Condensed", sans-serif;
font-weight: 700;
margin: 5em auto;
position: absolute;
top:0;
right:0;
bottom:0;
left:0;
padding: 10px 0;
width: 170px;
height:30px;
background: #e24500;
border: 1px solid #e24500;
color: #FFF;
overflow: hidden;
transition: all 0.1s;
}
.button:hover, .button:active {
text-decoration: none;
color: #3a3e47;
border-color: #e24500;
background: #fff;
}
.button span {
display: inline-block;
position: relative;
padding-right: 0;
transition: padding-right 0.2s;
}
.button span:after {
content:' ';
position: absolute;
top: 0px;
right: -18px;
opacity: 0;
width: 10px;
height: 10px;
margin-top: -10px;
background: rgba(0, 0, 0, 0);
border: 3px solid #e24500;
border-top: none;
border-right: none;
transition: opacity 0.2s, top 0.2s, right 0.2s;
transform: rotate(225deg);
}
.button:hover span, .button:active span {
padding-right: 30px;
}
.button:hover span:after, .button:active span:after {
transition: opacity 0.2s, top 0.2s, right 0.2s;
opacity: 1;
border-color: #e24500;
right: 0;
top: 62%;
}