body{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
}
a{
    position: relative;
    color: white;
    text-decoration: none;
    font-size: 40px;
    padding: 40px;
    transition: all 1s;
    transition: all 0.5s;
    background: yellow;
    overflow: hidden;
    font-weight: bold;
}

a::before{
    position: absolute;
    content: "Gumb";
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: #262626; */
    background-color: green;
    transition: all 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
}
a::after{
    position: absolute;
    content: "Gumb";
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: red;
    transition: all 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-100%, 100%);
   
}
a:hover::before{
    transform: translate(100%, -100%);
}
a:hover::after{
    transform: translate(0);
}
