Hover Border Animated Button #112

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-112">
    <span></span>
    <span></span>
    <span></span>
    <span></span> 
    Button 112
</button>
Button CSS
.btn-112 {
    --border_color: #ae00ff;
    position: relative;
    padding: 13px 20px;
    outline: none;
    border: solid 1px #aaaaaa3d;
    background: transparent;
    color: #ae00ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all .3s ease;
}

.btn-112:hover {
    background-color: #efefef;
    color: #000;
    transition-delay: 0.60s;
}

.btn-112:hover span {
    transition: .5s;
}

.btn-112 span {
    position: absolute;
}

.btn-112 span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border_color));
}

.btn-112 span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--border_color));
}

.btn-112 span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(190deg, transparent, var(--border_color));
}

.btn-112 span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(360deg, transparent, var(--border_color));
}

.btn-112:hover span:nth-child(1) {
    left: 100%;
}

.btn-112:hover span:nth-child(2) {
    top: 100%;
    transition-delay: .14s;
}

.btn-112:hover span:nth-child(3) {
    right: 100%;
    transition-delay: 0.28s;
}

.btn-112:hover span:nth-child(4) {
    bottom: 100%;
    transition-delay: 0.42s;
}

.btn-112:active {
    background: #05780a;
    color: #bfbfbf;
}

/*** disabled style ***/
.btn-112:disabled {
    pointer-events: none;
    opacity: .65;
    color: #7e7e7e;
    background: #dcdcdc;
    box-shadow: none;
    text-shadow: none;
}