Hi! I'm Johannes Dachsel, a web designer and developer based near Heidelberg, Germany. This is my personal website. Get in touch

Johannes Dachsel

100 Buttons 058


button{
    outline: none;
    cursor: pointer;
    display: block;
    overflow: hidden;
    position: relative;
    text-align: center;
    padding: 1em 1.5em 1em 3.5em;
    border: 1px solid #1F4AFC;
    color: #1F4AFC;
    background-color: transparent;
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    line-height: 1;
    transition: all .2s ease;
}

button:before,
button:after{
    box-sizing: border-box;
    position: absolute;
    left: 10px;
    top: 50%;
    content: "";
    display: block;
    width: 0px;
    height: 0px;
    border-right: 18px solid transparent;
    border-top: 18px solid #FEF731;
    border-left: 18px solid #FEF731;
    border-bottom: 18px solid #FEF731;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    transform-origin: center;
    transform-style: flat;
    transform-origin: 50% 0;
}

button:before{
    transform: rotate(-10deg) translate(0,-50%);
}

button:after{
    transform: rotate(10deg) translate(0,-50%);
}

button:hover:before{
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    animation: jaw-down 200ms 7, move-out 1s .5s 1;
}

button:hover:after{
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    animation: jaw-up 200ms 7, move-out 1s .5s 1;
}

@-webkit-keyframes jaw-up{
    from{transform: rotate(10deg) translate(0,-50%);}

    to{transform: rotate(45deg) translate(0,-50%);}
}

@-moz-keyframes jaw-up{
    from{transform: rotate(10deg) translate(0,-50%);}

    to{transform: rotate(45deg) translate(0,-50%);}
}

@keyframes jaw-up{
    from{transform: rotate(10deg) translate(0,-50%);}

    to{transform: rotate(45deg) translate(0,-50%);}
}

@-webkit-keyframes jaw-down{
    from{transform: rotate(-10deg) translate(0,-50%);}

    to{transform: rotate(-45deg) translate(0,-50%);}
}

@-moz-keyframes jaw-down{
    from{transform: rotate(-10deg) translate(0,-50%);}

    to{transform: rotate(-45deg) translate(0,-50%);}
}

@keyframes jaw-down{
    from{transform: rotate(-10deg) translate(0,-50%);}

    to{transform: rotate(-45deg) translate(0,-50%);}
}

@-webkit-keyframes move-out{
    from{left: 10px;}
    to{left: 110%;}
}

@-moz-keyframes move-out{
    from{left: 10px;}
    to{left: 110%;}
}

@keyframes move-out{
    from{left: 10px;}
    to{left: 110%;}
}