JSFiddle - React, Tailwind, and code Playground

by mmansion

HTML

<div class="button">
    <span>Link</span>
    <a href="http://courses.mansion.fm" target="_blank"></a>
</div>

CSS

.button {
    width: 100px;
    height: 50px;
    text-align: center;
    background: red;
}
.button span {
    position: absolute;
    z-index: 99;
    left: 40px;
    top: 25px;
    pointer-events: none;
}

/* (L)ink (V)isited (H)ate (A)ctive */
a:link {
    position: relative;
    margin: 0 auto;
    transition: width .5s;
    -webkit-transition: width .5s;
    font-size: 20px;
    line-height: 50px;
    color:white;
    text-decoration: underline;
    text-transform: uppercase;
    display: block;
    width: 100px;
    height: 50px;
    background: gray;
    border-radius: 20px;
}
a:visited {  
    color: white;
    text-decoration: underline;
}
a:hover {
    color: black;
    background: lightgray;
    width: 40px;
}
a:active {  
    text-decoration: none;
}

JavaScript

ß