Border Animated Button #80

CSS hover Border animated button

Adding these style CSS buttons to your website is easier than you think. Simply copy and paste the CSS code provided with each button design into your stylesheet

Preview Button Style

You can view the default style of buttons, the disabled state mode style of buttons, and the full-width block style of the button here. Some buttons style may not display in full width format

Button style

Disabled style

Full width block style

Button Source Code HTML and CSS

Click the button below to download the source code or edit it live.
To copy this click on the icon at the top right of the code box
Button HTML
<button class="btn-80">Button 80</button>
Button CSS
.btn-80 {
    background-color: #1a788f;
    background-image: none;
    color: #fff;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    -webkit-mask-image: -webkit-radial-gradient(#1a788f, #fff);
    border: 0 solid;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 2px #fff;
    display: inline-block;
    font-weight: bold;
    padding: 14px 24px;
    position: relative;
    text-transform: uppercase;
    transition: color 0.1s linear;
    text-decoration: none;
    --border_80: 2px solid #000;
    /*** full width block ***/
    /* width: 100%; */
}

.btn-80:after,
.btn-80:before {
    content: "";
    position: absolute;
    border: 0 solid;
    box-sizing: border-box;
}

.btn-80:before {
    border-bottom: var(--border_80);
    border-top: var(--border_80);
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.btn-80:hover:before {
    animation: border-top-and-bottom_80 1s forwards;
}

.btn-80:after {
    border-left: var(--border_80);
    border-right: var(--border_80);
    bottom: 50%;
    right: 0;
    transform: translateY(50%);
    width: 100%;
    z-index: -1;
}

.btn-80:hover:after {
    animation: border-right-and-left_80 1s forwards;
}

@keyframes border-top-and-bottom_80 {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

@keyframes border-right-and-left_80 {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

.btn-80:disabled {
    pointer-events: none;
    opacity: .65;
    color: #7e7e7e;
    box-shadow: none;
    background: #dcdcdc;
}