body {
    height: 100vh;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
}

a {
    text-decoration: none;
    color: transparent;
    font-family: roboto;
    font-size: 40px;
    border: 5px solid #5500FF;
    border-radius: 5px;
    font-weight: 300;
    letter-spacing: 0;
    padding: 50px 120px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background: #333;
}

a:before,
a:after{
    content: 'Button';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: #5500FF;
    color: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    transition: all 0.5s;
}

a:after{
    transform: translate(100%,-100%) rotate(45deg);
}
/* a:before{
    transform: translate(0,0) rotate(45deg);
} */

a:hover:before{
    transform: translate(-100%,100%) rotate(45deg); 
}
a:hover:after{
    transform: translate(0,0);
}